From 3e6307f2657d8b98130b651c085128a05ce55573 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 5 Jan 2026 22:32:43 +0000 Subject: [PATCH 1/2] feat: add custom prompt config in the request and return prompt in the response feat: update min_speaker_count and max_speaker_count to be optional docs: Clarify that min_speaker_count and max_speaker_count in SpeakerDiarizationConfig are not currently used docs: Update guidance on how to enable speaker diarization; to enable, set the diarization_config field to an empty SpeakerDiarizationConfig message PiperOrigin-RevId: 852383212 Source-Link: https://github.com/googleapis/googleapis/commit/1a141530079896691c100e0624705f2e0923f864 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c84243caa11c7fc89056e0bd07b4c4c6aea0510b Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZtd2FyZV9lbmdpbmUvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZwY19hY2Nlc3MtdjEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXZwY19hY2Nlc3MvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdlYl9yaXNrLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdlYl9yaXNrLXYxYmV0YTEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdlYl9yaXNrLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdlYl9zZWN1cml0eV9zY2FubmVyLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdlYl9zZWN1cml0eV9zY2FubmVyLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdlYl9zZWN1cml0eV9zY2FubmVyLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy1leGVjdXRpb25zLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy1leGVjdXRpb25zLXYxYmV0YS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtmbG93cy8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtzdGF0aW9ucy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtzdGF0aW9ucy12MWJldGEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLXdvcmtzdGF0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWlhbS1jbGllbnQvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWlhbS1jcmVkZW50aWFscy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWlhbS1jcmVkZW50aWFscy8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 --- .../google-cloud-vmware_engine/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-vmware_engine/.rubocop.yml | 39 + .../google-cloud-vmware_engine/.toys.rb | 28 + .../google-cloud-vmware_engine/.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../google-cloud-vmware_engine/CHANGELOG.md | 2 + .../google-cloud-vmware_engine/Gemfile | 28 + .../google-cloud-vmware_engine/LICENSE.md | 201 ++ .../google-cloud-vmware_engine/README.md | 142 + .../google-cloud-vmware_engine/Rakefile | 169 ++ .../google-cloud-vmware_engine.gemspec | 27 + .../lib/google-cloud-vmware_engine.rb | 19 + .../lib/google/cloud/vmware_engine.rb | 156 + .../lib/google/cloud/vmware_engine/version.rb | 26 + .../google/cloud/vmware_engine/client_test.rb | 64 + .../cloud/vmware_engine/version_test.rb | 26 + .../google-cloud-vmware_engine/test/helper.rb | 25 + .../google-cloud-vpc_access-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-vpc_access-v1/.rubocop.yml | 33 + .../google-cloud-vpc_access-v1/.toys.rb | 28 + .../google-cloud-vpc_access-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-vpc_access-v1/CHANGELOG.md | 2 + .../google-cloud-vpc_access-v1/Gemfile | 11 + .../google-cloud-vpc_access-v1/LICENSE.md | 201 ++ .../google-cloud-vpc_access-v1/README.md | 154 + .../google-cloud-vpc_access-v1/Rakefile | 169 ++ .../gapic_metadata.json | 38 + .../google-cloud-vpc_access-v1.gemspec | 29 + .../lib/google-cloud-vpc_access-v1.rb | 21 + .../lib/google/cloud/vpc_access/v1.rb | 45 + .../cloud/vpc_access/v1/bindings_override.rb | 64 + .../lib/google/cloud/vpc_access/v1/rest.rb | 38 + .../lib/google/cloud/vpc_access/v1/version.rb | 28 + .../cloud/vpc_access/v1/vpc_access_service.rb | 58 + .../v1/vpc_access_service/client.rb | 830 ++++++ .../v1/vpc_access_service/credentials.rb | 51 + .../v1/vpc_access_service/operations.rb | 841 ++++++ .../vpc_access/v1/vpc_access_service/paths.rb | 69 + .../vpc_access/v1/vpc_access_service/rest.rb | 56 + .../v1/vpc_access_service/rest/client.rb | 767 +++++ .../v1/vpc_access_service/rest/operations.rb | 925 ++++++ .../vpc_access_service/rest/service_stub.rb | 326 +++ .../cloud/vpcaccess/v1/vpc_access_pb.rb | 58 + .../vpcaccess/v1/vpc_access_services_pb.rb | 55 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../google/cloud/vpcaccess/v1/vpc_access.rb | 185 ++ .../google/longrunning/operations.rb | 191 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...et_metadata_google.cloud.vpcaccess.v1.json | 175 ++ .../vpc_access_service/create_connector.rb | 54 + .../vpc_access_service/delete_connector.rb | 54 + .../vpc_access_service/get_connector.rb | 47 + .../vpc_access_service/list_connectors.rb | 51 + .../v1/vpc_access_service_operations_test.rb | 400 +++ .../v1/vpc_access_service_paths_test.rb | 67 + .../v1/vpc_access_service_rest_test.rb | 319 ++ .../vpc_access/v1/vpc_access_service_test.rb | 373 +++ .../google-cloud-vpc_access-v1/test/helper.rb | 25 + .../google-cloud-vpc_access/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-vpc_access/.rubocop.yml | 39 + .../google-cloud-vpc_access/.toys.rb | 28 + .../google-cloud-vpc_access/.yardopts | 11 + .../google-cloud-vpc_access/AUTHENTICATION.md | 122 + .../google-cloud-vpc_access/CHANGELOG.md | 2 + .../google-cloud-vpc_access/Gemfile | 28 + .../google-cloud-vpc_access/LICENSE.md | 201 ++ .../google-cloud-vpc_access/README.md | 142 + .../google-cloud-vpc_access/Rakefile | 169 ++ .../google-cloud-vpc_access.gemspec | 27 + .../lib/google-cloud-vpc_access.rb | 19 + .../lib/google/cloud/vpc_access.rb | 158 + .../lib/google/cloud/vpc_access/version.rb | 26 + .../google/cloud/vpc_access/client_test.rb | 64 + .../google/cloud/vpc_access/version_test.rb | 26 + .../google-cloud-vpc_access/test/helper.rb | 25 + .../google-cloud-web_risk-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-web_risk-v1/.rubocop.yml | 33 + .../google-cloud-web_risk-v1/.toys.rb | 28 + .../google-cloud-web_risk-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-web_risk-v1/CHANGELOG.md | 2 + .../google-cloud-web_risk-v1/Gemfile | 11 + .../google-cloud-web_risk-v1/LICENSE.md | 201 ++ .../google-cloud-web_risk-v1/README.md | 154 + .../google-cloud-web_risk-v1/Rakefile | 169 ++ .../gapic_metadata.json | 43 + .../google-cloud-web_risk-v1.gemspec | 28 + .../lib/google-cloud-web_risk-v1.rb | 21 + .../lib/google/cloud/web_risk/v1.rb | 45 + .../lib/google/cloud/web_risk/v1/rest.rb | 37 + .../lib/google/cloud/web_risk/v1/version.rb | 28 + .../cloud/web_risk/v1/web_risk_service.rb | 57 + .../web_risk/v1/web_risk_service/client.rb | 916 ++++++ .../v1/web_risk_service/credentials.rb | 51 + .../v1/web_risk_service/operations.rb | 841 ++++++ .../web_risk/v1/web_risk_service/paths.rb | 47 + .../web_risk/v1/web_risk_service/rest.rb | 54 + .../v1/web_risk_service/rest/client.rb | 862 ++++++ .../v1/web_risk_service/rest/operations.rb | 925 ++++++ .../v1/web_risk_service/rest/service_stub.rb | 382 +++ .../lib/google/cloud/webrisk/v1/webrisk_pb.rb | 80 + .../cloud/webrisk/v1/webrisk_services_pb.rb | 82 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../google/cloud/webrisk/v1/webrisk.rb | 528 ++++ .../google/longrunning/operations.rb | 191 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../google-cloud-web_risk-v1/snippets/Gemfile | 32 + ...ppet_metadata_google.cloud.webrisk.v1.json | 215 ++ .../compute_threat_list_diff.rb | 47 + .../web_risk_service/create_submission.rb | 47 + .../web_risk_service/search_hashes.rb | 47 + .../snippets/web_risk_service/search_uris.rb | 47 + .../snippets/web_risk_service/submit_uri.rb | 54 + .../v1/web_risk_service_operations_test.rb | 400 +++ .../v1/web_risk_service_paths_test.rb | 55 + .../web_risk/v1/web_risk_service_rest_test.rb | 377 +++ .../web_risk/v1/web_risk_service_test.rb | 429 +++ .../google-cloud-web_risk-v1/test/helper.rb | 25 + .../google-cloud-web_risk-v1beta1/.gitignore | 22 + .../.repo-metadata.json | 19 + .../.rubocop.yml | 33 + .../google-cloud-web_risk-v1beta1/.toys.rb | 28 + .../google-cloud-web_risk-v1beta1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-web_risk-v1beta1/Gemfile | 11 + .../google-cloud-web_risk-v1beta1/LICENSE.md | 201 ++ .../google-cloud-web_risk-v1beta1/README.md | 154 + .../google-cloud-web_risk-v1beta1/Rakefile | 169 ++ .../gapic_metadata.json | 33 + .../google-cloud-web_risk-v1beta1.gemspec | 28 + .../lib/google-cloud-web_risk-v1beta1.rb | 21 + .../lib/google/cloud/web_risk/v1beta1.rb | 45 + .../lib/google/cloud/web_risk/v1beta1/rest.rb | 37 + .../google/cloud/web_risk/v1beta1/version.rb | 28 + .../web_risk/v1beta1/web_risk_service.rb | 55 + .../v1beta1/web_risk_service/client.rb | 662 +++++ .../v1beta1/web_risk_service/credentials.rb | 51 + .../web_risk/v1beta1/web_risk_service/rest.rb | 52 + .../v1beta1/web_risk_service/rest/client.rb | 622 ++++ .../web_risk_service/rest/service_stub.rb | 258 ++ .../cloud/webrisk/v1beta1/webrisk_pb.rb | 65 + .../webrisk/v1beta1/webrisk_services_pb.rb | 55 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../google/cloud/webrisk/v1beta1/webrisk.rb | 307 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../snippets/Gemfile | 32 + ...metadata_google.cloud.webrisk.v1beta1.json | 135 + .../compute_threat_list_diff.rb | 47 + .../web_risk_service/search_hashes.rb | 47 + .../snippets/web_risk_service/search_uris.rb | 47 + .../v1beta1/web_risk_service_rest_test.rb | 265 ++ .../web_risk/v1beta1/web_risk_service_test.rb | 286 ++ .../test/helper.rb | 25 + .../google-cloud-web_risk/.gitignore | 22 + .../google-cloud-web_risk/.repo-metadata.json | 18 + .../google-cloud-web_risk/.rubocop.yml | 39 + .../google-cloud-web_risk/.toys.rb | 28 + .../google-cloud-web_risk/.yardopts | 11 + .../google-cloud-web_risk/AUTHENTICATION.md | 122 + .../google-cloud-web_risk/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-web_risk/Gemfile | 28 + .../google-cloud-web_risk/LICENSE.md | 201 ++ .../google-cloud-web_risk/README.md | 142 + .../google-cloud-web_risk/Rakefile | 169 ++ .../google-cloud-web_risk.gemspec | 27 + .../lib/google-cloud-web_risk.rb | 19 + .../lib/google/cloud/web_risk.rb | 157 + .../lib/google/cloud/web_risk/version.rb | 26 + .../test/google/cloud/web_risk/client_test.rb | 64 + .../google/cloud/web_risk/version_test.rb | 26 + .../google-cloud-web_risk/test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 ++ .../gapic_metadata.json | 83 + ...ogle-cloud-web_security_scanner-v1.gemspec | 28 + .../google-cloud-web_security_scanner-v1.rb | 21 + .../google/cloud/web_security_scanner/v1.rb | 45 + .../cloud/web_security_scanner/v1/rest.rb | 37 + .../cloud/web_security_scanner/v1/version.rb | 28 + .../v1/web_security_scanner.rb | 56 + .../v1/web_security_scanner/client.rb | 1719 +++++++++++ .../v1/web_security_scanner/credentials.rb | 51 + .../v1/web_security_scanner/rest.rb | 53 + .../v1/web_security_scanner/rest/client.rb | 1585 ++++++++++ .../web_security_scanner/rest/service_stub.rb | 878 ++++++ .../websecurityscanner/v1/crawled_url_pb.rb | 42 + .../websecurityscanner/v1/finding_addon_pb.rb | 51 + .../cloud/websecurityscanner/v1/finding_pb.rb | 48 + .../v1/finding_type_stats_pb.rb | 42 + .../v1/scan_config_error_pb.rb | 43 + .../websecurityscanner/v1/scan_config_pb.rb | 55 + .../v1/scan_run_error_trace_pb.rb | 46 + .../websecurityscanner/v1/scan_run_log_pb.rb | 46 + .../websecurityscanner/v1/scan_run_pb.rb | 51 + .../v1/scan_run_warning_trace_pb.rb | 43 + .../v1/web_security_scanner_pb.rb | 75 + .../v1/web_security_scanner_services_pb.rb | 72 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../websecurityscanner/v1/crawled_url.rb | 44 + .../cloud/websecurityscanner/v1/finding.rb | 117 + .../websecurityscanner/v1/finding_addon.rb | 191 ++ .../v1/finding_type_stats.rb | 39 + .../websecurityscanner/v1/scan_config.rb | 211 ++ .../v1/scan_config_error.rb | 191 ++ .../cloud/websecurityscanner/v1/scan_run.rb | 110 + .../v1/scan_run_error_trace.rb | 77 + .../websecurityscanner/v1/scan_run_log.rb | 56 + .../v1/scan_run_warning_trace.rb | 65 + .../v1/web_security_scanner.rb | 278 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../snippets/Gemfile | 32 + ...ta_google.cloud.websecurityscanner.v1.json | 535 ++++ .../create_scan_config.rb | 47 + .../delete_scan_config.rb | 47 + .../web_security_scanner/get_finding.rb | 47 + .../web_security_scanner/get_scan_config.rb | 47 + .../web_security_scanner/get_scan_run.rb | 47 + .../web_security_scanner/list_crawled_urls.rb | 51 + .../list_finding_type_stats.rb | 47 + .../web_security_scanner/list_findings.rb | 51 + .../web_security_scanner/list_scan_configs.rb | 51 + .../web_security_scanner/list_scan_runs.rb | 51 + .../web_security_scanner/start_scan_run.rb | 47 + .../web_security_scanner/stop_scan_run.rb | 47 + .../update_scan_config.rb | 47 + .../v1/web_security_scanner_rest_test.rb | 812 ++++++ .../v1/web_security_scanner_test.rb | 900 ++++++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 ++ .../gapic_metadata.json | 83 + ...-cloud-web_security_scanner-v1beta.gemspec | 28 + ...oogle-cloud-web_security_scanner-v1beta.rb | 21 + .../cloud/web_security_scanner/v1beta.rb | 45 + .../cloud/web_security_scanner/v1beta/rest.rb | 37 + .../web_security_scanner/v1beta/version.rb | 28 + .../v1beta/web_security_scanner.rb | 57 + .../v1beta/web_security_scanner/client.rb | 1721 +++++++++++ .../web_security_scanner/credentials.rb | 51 + .../v1beta/web_security_scanner/paths.rb | 104 + .../v1beta/web_security_scanner/rest.rb | 54 + .../web_security_scanner/rest/client.rb | 1587 ++++++++++ .../web_security_scanner/rest/service_stub.rb | 878 ++++++ .../v1beta/crawled_url_pb.rb | 42 + .../v1beta/finding_addon_pb.rb | 48 + .../websecurityscanner/v1beta/finding_pb.rb | 46 + .../v1beta/finding_type_stats_pb.rb | 42 + .../v1beta/scan_config_error_pb.rb | 43 + .../v1beta/scan_config_pb.rb | 57 + .../v1beta/scan_run_error_trace_pb.rb | 46 + .../websecurityscanner/v1beta/scan_run_pb.rb | 52 + .../v1beta/scan_run_warning_trace_pb.rb | 43 + .../v1beta/web_security_scanner_pb.rb | 77 + .../web_security_scanner_services_pb.rb | 73 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../websecurityscanner/v1beta/crawled_url.rb | 44 + .../websecurityscanner/v1beta/finding.rb | 93 + .../v1beta/finding_addon.rb | 111 + .../v1beta/finding_type_stats.rb | 39 + .../websecurityscanner/v1beta/scan_config.rb | 192 ++ .../v1beta/scan_config_error.rb | 191 ++ .../websecurityscanner/v1beta/scan_run.rb | 110 + .../v1beta/scan_run_error_trace.rb | 77 + .../v1beta/scan_run_warning_trace.rb | 62 + .../v1beta/web_security_scanner.rb | 278 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../snippets/Gemfile | 32 + ...oogle.cloud.websecurityscanner.v1beta.json | 535 ++++ .../create_scan_config.rb | 47 + .../delete_scan_config.rb | 47 + .../web_security_scanner/get_finding.rb | 47 + .../web_security_scanner/get_scan_config.rb | 47 + .../web_security_scanner/get_scan_run.rb | 47 + .../web_security_scanner/list_crawled_urls.rb | 51 + .../list_finding_type_stats.rb | 47 + .../web_security_scanner/list_findings.rb | 51 + .../web_security_scanner/list_scan_configs.rb | 51 + .../web_security_scanner/list_scan_runs.rb | 51 + .../web_security_scanner/start_scan_run.rb | 47 + .../web_security_scanner/stop_scan_run.rb | 47 + .../update_scan_config.rb | 47 + .../v1beta/web_security_scanner_paths_test.rb | 91 + .../v1beta/web_security_scanner_rest_test.rb | 812 ++++++ .../v1beta/web_security_scanner_test.rb | 900 ++++++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-web_security_scanner/Gemfile | 28 + .../LICENSE.md | 201 ++ .../README.md | 142 + .../Rakefile | 169 ++ .../google-cloud-web_security_scanner.gemspec | 27 + .../lib/google-cloud-web_security_scanner.rb | 19 + .../lib/google/cloud/web_security_scanner.rb | 158 + .../cloud/web_security_scanner/version.rb | 26 + .../cloud/web_security_scanner/client_test.rb | 64 + .../web_security_scanner/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 ++ .../gapic_metadata.json | 38 + ...ogle-cloud-workflows-executions-v1.gemspec | 28 + .../google-cloud-workflows-executions-v1.rb | 21 + .../google/cloud/workflows/executions/v1.rb | 47 + .../workflows/executions/v1/executions.rb | 58 + .../executions/v1/executions/client.rb | 802 +++++ .../executions/v1/executions/credentials.rb | 53 + .../executions/v1/executions/paths.rb | 75 + .../executions/v1/executions/rest.rb | 55 + .../executions/v1/executions/rest/client.rb | 731 +++++ .../v1/executions/rest/service_stub.rb | 329 +++ .../workflows/executions/v1/executions_pb.rb | 69 + .../executions/v1/executions_services_pb.rb | 57 + .../cloud/workflows/executions/v1/rest.rb | 39 + .../cloud/workflows/executions/v1/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../workflows/executions/v1/executions.rb | 369 +++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../snippets/Gemfile | 32 + .../snippets/executions/cancel_execution.rb | 47 + .../snippets/executions/create_execution.rb | 47 + .../snippets/executions/get_execution.rb | 47 + .../snippets/executions/list_executions.rb | 51 + ..._google.cloud.workflows.executions.v1.json | 175 ++ .../executions/v1/executions_paths_test.rb | 67 + .../executions/v1/executions_rest_test.rb | 322 ++ .../executions/v1/executions_test.rb | 355 +++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 ++ .../README.md | 154 + .../Rakefile | 169 ++ .../gapic_metadata.json | 38 + ...-cloud-workflows-executions-v1beta.gemspec | 28 + ...oogle-cloud-workflows-executions-v1beta.rb | 21 + .../cloud/workflows/executions/v1beta.rb | 42 + .../workflows/executions/v1beta/executions.rb | 52 + .../executions/v1beta/executions/client.rb | 789 +++++ .../v1beta/executions/credentials.rb | 53 + .../executions/v1beta/executions/paths.rb | 75 + .../executions/v1beta/executions_pb.rb | 59 + .../v1beta/executions_services_pb.rb | 57 + .../workflows/executions/v1beta/version.rb | 30 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../workflows/executions/v1beta/executions.rb | 200 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../snippets/Gemfile | 32 + .../snippets/executions/cancel_execution.rb | 47 + .../snippets/executions/create_execution.rb | 47 + .../snippets/executions/get_execution.rb | 47 + .../snippets/executions/list_executions.rb | 51 + ...gle.cloud.workflows.executions.v1beta.json | 175 ++ .../v1beta/executions_paths_test.rb | 67 + .../executions/v1beta/executions_test.rb | 351 +++ .../test/helper.rb | 25 + .../google-cloud-workflows-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-workflows-v1/.rubocop.yml | 33 + .../google-cloud-workflows-v1/.toys.rb | 28 + .../google-cloud-workflows-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-workflows-v1/CHANGELOG.md | 2 + .../google-cloud-workflows-v1/Gemfile | 11 + .../google-cloud-workflows-v1/LICENSE.md | 201 ++ .../google-cloud-workflows-v1/README.md | 154 + .../google-cloud-workflows-v1/Rakefile | 169 ++ .../gapic_metadata.json | 48 + .../google-cloud-workflows-v1.gemspec | 29 + .../lib/google-cloud-workflows-v1.rb | 21 + .../lib/google/cloud/workflows/v1.rb | 45 + .../cloud/workflows/v1/bindings_override.rb | 75 + .../lib/google/cloud/workflows/v1/rest.rb | 38 + .../lib/google/cloud/workflows/v1/version.rb | 28 + .../google/cloud/workflows/v1/workflows.rb | 58 + .../cloud/workflows/v1/workflows/client.rb | 1074 +++++++ .../workflows/v1/workflows/credentials.rb | 51 + .../workflows/v1/workflows/operations.rb | 841 ++++++ .../cloud/workflows/v1/workflows/paths.rb | 113 + .../cloud/workflows/v1/workflows/rest.rb | 56 + .../workflows/v1/workflows/rest/client.rb | 997 +++++++ .../workflows/v1/workflows/rest/operations.rb | 925 ++++++ .../v1/workflows/rest/service_stub.rb | 449 +++ .../google/cloud/workflows/v1/workflows_pb.rb | 67 + .../workflows/v1/workflows_services_pb.rb | 66 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../google/cloud/workflows/v1/workflows.rb | 424 +++ .../google/longrunning/operations.rb | 191 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...et_metadata_google.cloud.workflows.v1.json | 255 ++ .../snippets/workflows/create_workflow.rb | 54 + .../snippets/workflows/delete_workflow.rb | 54 + .../snippets/workflows/get_workflow.rb | 47 + .../workflows/list_workflow_revisions.rb | 51 + .../snippets/workflows/list_workflows.rb | 51 + .../snippets/workflows/update_workflow.rb | 54 + .../workflows/v1/workflows_operations_test.rb | 400 +++ .../workflows/v1/workflows_paths_test.rb | 91 + .../cloud/workflows/v1/workflows_rest_test.rb | 433 +++ .../cloud/workflows/v1/workflows_test.rb | 511 ++++ .../google-cloud-workflows-v1/test/helper.rb | 25 + .../google-cloud-workflows-v1beta/.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-workflows-v1beta/.toys.rb | 28 + .../google-cloud-workflows-v1beta/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-workflows-v1beta/Gemfile | 11 + .../google-cloud-workflows-v1beta/LICENSE.md | 201 ++ .../google-cloud-workflows-v1beta/README.md | 154 + .../google-cloud-workflows-v1beta/Rakefile | 169 ++ .../gapic_metadata.json | 43 + .../google-cloud-workflows-v1beta.gemspec | 29 + .../lib/google-cloud-workflows-v1beta.rb | 21 + .../lib/google/cloud/workflows/v1beta.rb | 45 + .../workflows/v1beta/bindings_override.rb | 75 + .../lib/google/cloud/workflows/v1beta/rest.rb | 38 + .../google/cloud/workflows/v1beta/version.rb | 28 + .../cloud/workflows/v1beta/workflows.rb | 58 + .../workflows/v1beta/workflows/client.rb | 952 ++++++ .../workflows/v1beta/workflows/credentials.rb | 51 + .../workflows/v1beta/workflows/operations.rb | 841 ++++++ .../cloud/workflows/v1beta/workflows/paths.rb | 69 + .../cloud/workflows/v1beta/workflows/rest.rb | 56 + .../workflows/v1beta/workflows/rest/client.rb | 882 ++++++ .../v1beta/workflows/rest/operations.rb | 925 ++++++ .../v1beta/workflows/rest/service_stub.rb | 388 +++ .../cloud/workflows/v1beta/workflows_pb.rb | 61 + .../workflows/v1beta/workflows_services_pb.rb | 64 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/workflows/v1beta/workflows.rb | 245 ++ .../google/longrunning/operations.rb | 191 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + ...etadata_google.cloud.workflows.v1beta.json | 215 ++ .../snippets/workflows/create_workflow.rb | 54 + .../snippets/workflows/delete_workflow.rb | 54 + .../snippets/workflows/get_workflow.rb | 47 + .../snippets/workflows/list_workflows.rb | 51 + .../snippets/workflows/update_workflow.rb | 54 + .../v1beta/workflows_operations_test.rb | 400 +++ .../workflows/v1beta/workflows_paths_test.rb | 67 + .../workflows/v1beta/workflows_rest_test.rb | 376 +++ .../cloud/workflows/v1beta/workflows_test.rb | 442 +++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-workflows-executions/Gemfile | 28 + .../LICENSE.md | 201 ++ .../README.md | 142 + .../Rakefile | 169 ++ .../google-cloud-workflows-executions.gemspec | 27 + .../lib/google-cloud-workflows-executions.rb | 19 + .../lib/google/cloud/workflows/executions.rb | 150 + .../cloud/workflows/executions/version.rb | 28 + .../cloud/workflows/executions/client_test.rb | 53 + .../workflows/executions/version_test.rb | 26 + .../test/helper.rb | 25 + .../google-cloud-workflows/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-workflows/.rubocop.yml | 39 + .../google-cloud-workflows/.toys.rb | 28 + .../google-cloud-workflows/.yardopts | 11 + .../google-cloud-workflows/AUTHENTICATION.md | 122 + .../google-cloud-workflows/CHANGELOG.md | 2 + .../google-cloud-workflows/Gemfile | 28 + .../google-cloud-workflows/LICENSE.md | 201 ++ .../google-cloud-workflows/README.md | 142 + .../google-cloud-workflows/Rakefile | 169 ++ .../google-cloud-workflows.gemspec | 27 + .../lib/google-cloud-workflows.rb | 19 + .../lib/google/cloud/workflows.rb | 158 + .../lib/google/cloud/workflows/version.rb | 26 + .../google/cloud/workflows/client_test.rb | 64 + .../google/cloud/workflows/version_test.rb | 26 + .../google-cloud-workflows/test/helper.rb | 25 + .../google-cloud-workstations-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-workstations-v1/.rubocop.yml | 33 + .../google-cloud-workstations-v1/.toys.rb | 28 + .../google-cloud-workstations-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-workstations-v1/CHANGELOG.md | 2 + .../google-cloud-workstations-v1/Gemfile | 11 + .../google-cloud-workstations-v1/LICENSE.md | 201 ++ .../google-cloud-workstations-v1/README.md | 153 + .../google-cloud-workstations-v1/Rakefile | 169 ++ .../gapic_metadata.json | 118 + .../google-cloud-workstations-v1.gemspec | 30 + .../lib/google-cloud-workstations-v1.rb | 21 + .../lib/google/cloud/workstations/v1.rb | 45 + .../workstations/v1/bindings_override.rb | 110 + .../lib/google/cloud/workstations/v1/rest.rb | 38 + .../google/cloud/workstations/v1/version.rb | 28 + .../cloud/workstations/v1/workstations.rb | 56 + .../workstations/v1/workstations/client.rb | 2595 +++++++++++++++++ .../v1/workstations/credentials.rb | 47 + .../v1/workstations/operations.rb | 841 ++++++ .../workstations/v1/workstations/paths.rb | 113 + .../workstations/v1/workstations/rest.rb | 54 + .../v1/workstations/rest/client.rb | 2420 +++++++++++++++ .../v1/workstations/rest/operations.rb | 925 ++++++ .../v1/workstations/rest/service_stub.rb | 1310 +++++++++ .../cloud/workstations/v1/workstations_pb.rb | 97 + .../v1/workstations_services_pb.rb | 86 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/workstations/v1/workstations.rb | 1177 ++++++++ .../google/longrunning/operations.rb | 191 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + ...metadata_google.cloud.workstations.v1.json | 815 ++++++ .../workstations/create_workstation.rb | 54 + .../create_workstation_cluster.rb | 54 + .../workstations/create_workstation_config.rb | 54 + .../workstations/delete_workstation.rb | 54 + .../delete_workstation_cluster.rb | 54 + .../workstations/delete_workstation_config.rb | 54 + .../workstations/generate_access_token.rb | 47 + .../snippets/workstations/get_workstation.rb | 47 + .../workstations/get_workstation_cluster.rb | 47 + .../workstations/get_workstation_config.rb | 47 + .../list_usable_workstation_configs.rb | 51 + .../workstations/list_usable_workstations.rb | 51 + .../workstations/list_workstation_clusters.rb | 51 + .../workstations/list_workstation_configs.rb | 51 + .../workstations/list_workstations.rb | 51 + .../workstations/start_workstation.rb | 54 + .../snippets/workstations/stop_workstation.rb | 54 + .../workstations/update_workstation.rb | 54 + .../update_workstation_cluster.rb | 54 + .../workstations/update_workstation_config.rb | 54 + .../v1/workstations_operations_test.rb | 400 +++ .../v1/workstations_paths_test.rb | 91 + .../workstations/v1/workstations_rest_test.rb | 1220 ++++++++ .../workstations/v1/workstations_test.rb | 1441 +++++++++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../google-cloud-workstations-v1beta/.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-workstations-v1beta/Gemfile | 11 + .../LICENSE.md | 201 ++ .../README.md | 153 + .../google-cloud-workstations-v1beta/Rakefile | 169 ++ .../gapic_metadata.json | 118 + .../google-cloud-workstations-v1beta.gemspec | 30 + .../lib/google-cloud-workstations-v1beta.rb | 21 + .../lib/google/cloud/workstations/v1beta.rb | 45 + .../workstations/v1beta/bindings_override.rb | 110 + .../google/cloud/workstations/v1beta/rest.rb | 38 + .../cloud/workstations/v1beta/version.rb | 28 + .../cloud/workstations/v1beta/workstations.rb | 56 + .../v1beta/workstations/client.rb | 2595 +++++++++++++++++ .../v1beta/workstations/credentials.rb | 47 + .../v1beta/workstations/operations.rb | 841 ++++++ .../workstations/v1beta/workstations/paths.rb | 113 + .../workstations/v1beta/workstations/rest.rb | 54 + .../v1beta/workstations/rest/client.rb | 2420 +++++++++++++++ .../v1beta/workstations/rest/operations.rb | 925 ++++++ .../v1beta/workstations/rest/service_stub.rb | 1310 +++++++++ .../workstations/v1beta/workstations_pb.rb | 100 + .../v1beta/workstations_services_pb.rb | 86 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../cloud/workstations/v1beta/workstations.rb | 1265 ++++++++ .../google/longrunning/operations.rb | 191 ++ .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/empty.rb | 34 + .../proto_docs/google/protobuf/field_mask.rb | 229 ++ .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + ...data_google.cloud.workstations.v1beta.json | 815 ++++++ .../workstations/create_workstation.rb | 54 + .../create_workstation_cluster.rb | 54 + .../workstations/create_workstation_config.rb | 54 + .../workstations/delete_workstation.rb | 54 + .../delete_workstation_cluster.rb | 54 + .../workstations/delete_workstation_config.rb | 54 + .../workstations/generate_access_token.rb | 47 + .../snippets/workstations/get_workstation.rb | 47 + .../workstations/get_workstation_cluster.rb | 47 + .../workstations/get_workstation_config.rb | 47 + .../list_usable_workstation_configs.rb | 51 + .../workstations/list_usable_workstations.rb | 51 + .../workstations/list_workstation_clusters.rb | 51 + .../workstations/list_workstation_configs.rb | 51 + .../workstations/list_workstations.rb | 51 + .../workstations/start_workstation.rb | 54 + .../snippets/workstations/stop_workstation.rb | 54 + .../workstations/update_workstation.rb | 54 + .../update_workstation_cluster.rb | 54 + .../workstations/update_workstation_config.rb | 54 + .../v1beta/workstations_operations_test.rb | 400 +++ .../v1beta/workstations_paths_test.rb | 91 + .../v1beta/workstations_rest_test.rb | 1220 ++++++++ .../workstations/v1beta/workstations_test.rb | 1441 +++++++++ .../test/helper.rb | 25 + .../google-cloud-workstations/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-workstations/.rubocop.yml | 39 + .../google-cloud-workstations/.toys.rb | 28 + .../google-cloud-workstations/.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../google-cloud-workstations/CHANGELOG.md | 2 + .../google-cloud-workstations/Gemfile | 28 + .../google-cloud-workstations/LICENSE.md | 201 ++ .../google-cloud-workstations/README.md | 141 + .../google-cloud-workstations/Rakefile | 169 ++ .../google-cloud-workstations.gemspec | 27 + .../lib/google-cloud-workstations.rb | 19 + .../lib/google/cloud/workstations.rb | 156 + .../lib/google/cloud/workstations/version.rb | 26 + .../google/cloud/workstations/client_test.rb | 64 + .../google/cloud/workstations/version_test.rb | 26 + .../google-cloud-workstations/test/helper.rb | 25 + owl-bot-staging/google-iam-client/.gitignore | 22 + .../google-iam-client/.repo-metadata.json | 17 + .../google-iam-client/.rubocop.yml | 39 + owl-bot-staging/google-iam-client/.toys.rb | 28 + owl-bot-staging/google-iam-client/.yardopts | 11 + .../google-iam-client/AUTHENTICATION.md | 122 + .../google-iam-client/CHANGELOG.md | 2 + owl-bot-staging/google-iam-client/Gemfile | 28 + owl-bot-staging/google-iam-client/LICENSE.md | 201 ++ owl-bot-staging/google-iam-client/README.md | 142 + owl-bot-staging/google-iam-client/Rakefile | 169 ++ .../google-iam-client/google-iam.gemspec | 27 + .../google-iam-client/lib/google-iam.rb | 19 + .../google-iam-client/lib/google/iam.rb | 102 + .../lib/google/iam/version.rb | 24 + .../test/google/iam/client_test.rb | 64 + .../test/google/iam/version_test.rb | 26 + .../google-iam-client/test/helper.rb | 25 + .../google-iam-credentials-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-iam-credentials-v1/.rubocop.yml | 33 + .../google-iam-credentials-v1/.toys.rb | 28 + .../google-iam-credentials-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-iam-credentials-v1/CHANGELOG.md | 2 + .../google-iam-credentials-v1/Gemfile | 11 + .../google-iam-credentials-v1/LICENSE.md | 201 ++ .../google-iam-credentials-v1/README.md | 154 + .../google-iam-credentials-v1/Rakefile | 169 ++ .../gapic_metadata.json | 38 + .../google-iam-credentials-v1.gemspec | 28 + .../lib/google-iam-credentials-v1.rb | 21 + .../lib/google/iam/credentials/v1.rb | 45 + .../google/iam/credentials/v1/common_pb.rb | 56 + .../iam/credentials/v1/iam_credentials.rb | 63 + .../credentials/v1/iam_credentials/client.rb | 854 ++++++ .../v1/iam_credentials/credentials.rb | 51 + .../credentials/v1/iam_credentials/paths.rb | 50 + .../credentials/v1/iam_credentials/rest.rb | 60 + .../v1/iam_credentials/rest/client.rb | 783 +++++ .../v1/iam_credentials/rest/service_stub.rb | 329 +++ .../iam/credentials/v1/iamcredentials_pb.rb | 45 + .../v1/iamcredentials_services_pb.rb | 59 + .../lib/google/iam/credentials/v1/rest.rb | 37 + .../lib/google/iam/credentials/v1/version.rb | 28 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 +++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 ++ .../google/iam/credentials/v1/common.rb | 186 ++ .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../snippets/Gemfile | 32 + .../iam_credentials/generate_access_token.rb | 47 + .../iam_credentials/generate_id_token.rb | 47 + .../snippets/iam_credentials/sign_blob.rb | 47 + .../snippets/iam_credentials/sign_jwt.rb | 47 + ...et_metadata_google.iam.credentials.v1.json | 175 ++ .../v1/iam_credentials_paths_test.rb | 55 + .../v1/iam_credentials_rest_test.rb | 325 +++ .../credentials/v1/iam_credentials_test.rb | 356 +++ .../google-iam-credentials-v1/test/helper.rb | 25 + .../google-iam-credentials/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-iam-credentials/.rubocop.yml | 39 + .../google-iam-credentials/.toys.rb | 28 + .../google-iam-credentials/.yardopts | 11 + .../google-iam-credentials/AUTHENTICATION.md | 122 + .../google-iam-credentials/CHANGELOG.md | 2 + .../google-iam-credentials/Gemfile | 28 + .../google-iam-credentials/LICENSE.md | 201 ++ .../google-iam-credentials/README.md | 142 + .../google-iam-credentials/Rakefile | 169 ++ .../google-iam-credentials.gemspec | 27 + .../lib/google-iam-credentials.rb | 19 + .../lib/google/iam/credentials.rb | 112 + .../lib/google/iam/credentials/version.rb | 26 + .../google/iam/credentials/client_test.rb | 64 + .../google/iam/credentials/version_test.rb | 26 + .../google-iam-credentials/test/helper.rb | 25 + 830 files changed, 126200 insertions(+) create mode 100644 owl-bot-staging/google-cloud-vmware_engine/.gitignore create mode 100644 owl-bot-staging/google-cloud-vmware_engine/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-vmware_engine/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-vmware_engine/.toys.rb create mode 100644 owl-bot-staging/google-cloud-vmware_engine/.yardopts create mode 100644 owl-bot-staging/google-cloud-vmware_engine/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-vmware_engine/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-vmware_engine/Gemfile create mode 100644 owl-bot-staging/google-cloud-vmware_engine/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-vmware_engine/README.md create mode 100644 owl-bot-staging/google-cloud-vmware_engine/Rakefile create mode 100644 owl-bot-staging/google-cloud-vmware_engine/google-cloud-vmware_engine.gemspec create mode 100644 owl-bot-staging/google-cloud-vmware_engine/lib/google-cloud-vmware_engine.rb create mode 100644 owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine.rb create mode 100644 owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine/version.rb create mode 100644 owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/client_test.rb create mode 100644 owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/version_test.rb create mode 100644 owl-bot-staging/google-cloud-vmware_engine/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/README.md create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/google-cloud-vpc_access-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google-cloud-vpc_access-v1.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/client.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_pb.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/cloud/vpcaccess/v1/vpc_access.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/snippet_metadata_google.cloud.vpcaccess.v1.json create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/create_connector.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/delete_connector.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/get_connector.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/list_connectors.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_test.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access/.gitignore create mode 100644 owl-bot-staging/google-cloud-vpc_access/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-vpc_access/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-vpc_access/.toys.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access/.yardopts create mode 100644 owl-bot-staging/google-cloud-vpc_access/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-vpc_access/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-vpc_access/Gemfile create mode 100644 owl-bot-staging/google-cloud-vpc_access/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-vpc_access/README.md create mode 100644 owl-bot-staging/google-cloud-vpc_access/Rakefile create mode 100644 owl-bot-staging/google-cloud-vpc_access/google-cloud-vpc_access.gemspec create mode 100644 owl-bot-staging/google-cloud-vpc_access/lib/google-cloud-vpc_access.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access/version.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/client_test.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/version_test.rb create mode 100644 owl-bot-staging/google-cloud-vpc_access/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/README.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/google-cloud-web_risk-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google-cloud-web_risk-v1.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/client.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/cloud/webrisk/v1/webrisk.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/snippet_metadata_google.cloud.webrisk.v1.json create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/compute_threat_list_diff.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/create_submission.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_hashes.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_uris.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/submit_uri.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_test.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.yardopts create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/Rakefile create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/google-cloud-web_risk-v1beta1.gemspec create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google-cloud-web_risk-v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/rest.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/version.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/client.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/cloud/webrisk/v1beta1/webrisk.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/snippet_metadata_google.cloud.webrisk.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/compute_threat_list_diff.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_hashes.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_uris.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_test.rb create mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-web_risk/.gitignore create mode 100644 owl-bot-staging/google-cloud-web_risk/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-web_risk/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-web_risk/.toys.rb create mode 100644 owl-bot-staging/google-cloud-web_risk/.yardopts create mode 100644 owl-bot-staging/google-cloud-web_risk/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-web_risk/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-web_risk/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_risk/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-web_risk/README.md create mode 100644 owl-bot-staging/google-cloud-web_risk/Rakefile create mode 100644 owl-bot-staging/google-cloud-web_risk/google-cloud-web_risk.gemspec create mode 100644 owl-bot-staging/google-cloud-web_risk/lib/google-cloud-web_risk.rb create mode 100644 owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk.rb create mode 100644 owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb create mode 100644 owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/client_test.rb create mode 100644 owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/version_test.rb create mode 100644 owl-bot-staging/google-cloud-web_risk/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/README.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/google-cloud-web_security_scanner-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google-cloud-web_security_scanner-v1.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/client.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/credentials.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/crawled_url_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_addon_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_type_stats_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_error_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_error_trace_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_log_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/crawled_url.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_addon.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_type_stats.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config_error.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_error_trace.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_log.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_warning_trace.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/web_security_scanner.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/snippet_metadata_google.cloud.websecurityscanner.v1.json create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/create_scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/delete_scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_finding.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_run.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_crawled_urls.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_finding_type_stats.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_findings.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_configs.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_runs.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/start_scan_run.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/stop_scan_run.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/update_scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_test.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/google-cloud-web_security_scanner-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/snippet_metadata_google.cloud.websecurityscanner.v1beta.json create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.gitignore create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.toys.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.yardopts create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/Gemfile create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/README.md create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/Rakefile create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/google-cloud-web_security_scanner.gemspec create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/lib/google-cloud-web_security_scanner.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner/version.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/client_test.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/version_test.rb create mode 100644 owl-bot-staging/google-cloud-web_security_scanner/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/README.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/google-cloud-workflows-executions-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/snippet_metadata_google.cloud.workflows.executions.v1.json create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/google-cloud-workflows-executions-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/snippet_metadata_google.cloud.workflows.executions.v1beta.json create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-workflows-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workflows-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-workflows-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1/README.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-workflows-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows-v1/google-cloud-workflows-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/snippet_metadata_google.cloud.workflows.v1.json create mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/google-cloud-workflows-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/snippet_metadata_google.cloud.workflows.v1beta.json create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.gitignore create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.yardopts create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/README.md create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Rakefile create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/google-cloud-workflows-executions.gemspec create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google-cloud-workflows-executions.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions/version.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/client_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/version_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.gitignore create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.yardopts create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Gemfile create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/README.md create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Rakefile create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/google-cloud-workflows.gemspec create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google-cloud-workflows.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows/version.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/client_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/version_test.rb create mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-workstations-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workstations-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workstations-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-workstations-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-workstations-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1/README.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-workstations-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-workstations-v1/google-cloud-workstations-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.gitignore create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.yardopts create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/Gemfile create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/README.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/Rakefile create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/google-cloud-workstations-v1beta.gemspec create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-workstations/.gitignore create mode 100644 owl-bot-staging/google-cloud-workstations/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-workstations/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-workstations/.toys.rb create mode 100644 owl-bot-staging/google-cloud-workstations/.yardopts create mode 100644 owl-bot-staging/google-cloud-workstations/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-workstations/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-workstations/Gemfile create mode 100644 owl-bot-staging/google-cloud-workstations/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-workstations/README.md create mode 100644 owl-bot-staging/google-cloud-workstations/Rakefile create mode 100644 owl-bot-staging/google-cloud-workstations/google-cloud-workstations.gemspec create mode 100644 owl-bot-staging/google-cloud-workstations/lib/google-cloud-workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations.rb create mode 100644 owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations/version.rb create mode 100644 owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/client_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/version_test.rb create mode 100644 owl-bot-staging/google-cloud-workstations/test/helper.rb create mode 100644 owl-bot-staging/google-iam-client/.gitignore create mode 100644 owl-bot-staging/google-iam-client/.repo-metadata.json create mode 100644 owl-bot-staging/google-iam-client/.rubocop.yml create mode 100644 owl-bot-staging/google-iam-client/.toys.rb create mode 100644 owl-bot-staging/google-iam-client/.yardopts create mode 100644 owl-bot-staging/google-iam-client/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-iam-client/CHANGELOG.md create mode 100644 owl-bot-staging/google-iam-client/Gemfile create mode 100644 owl-bot-staging/google-iam-client/LICENSE.md create mode 100644 owl-bot-staging/google-iam-client/README.md create mode 100644 owl-bot-staging/google-iam-client/Rakefile create mode 100644 owl-bot-staging/google-iam-client/google-iam.gemspec create mode 100644 owl-bot-staging/google-iam-client/lib/google-iam.rb create mode 100644 owl-bot-staging/google-iam-client/lib/google/iam.rb create mode 100644 owl-bot-staging/google-iam-client/lib/google/iam/version.rb create mode 100644 owl-bot-staging/google-iam-client/test/google/iam/client_test.rb create mode 100644 owl-bot-staging/google-iam-client/test/google/iam/version_test.rb create mode 100644 owl-bot-staging/google-iam-client/test/helper.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/.gitignore create mode 100644 owl-bot-staging/google-iam-credentials-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-iam-credentials-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-iam-credentials-v1/.toys.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/.yardopts create mode 100644 owl-bot-staging/google-iam-credentials-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-iam-credentials-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-iam-credentials-v1/Gemfile create mode 100644 owl-bot-staging/google-iam-credentials-v1/LICENSE.md create mode 100644 owl-bot-staging/google-iam-credentials-v1/README.md create mode 100644 owl-bot-staging/google-iam-credentials-v1/Rakefile create mode 100644 owl-bot-staging/google-iam-credentials-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-iam-credentials-v1/google-iam-credentials-v1.gemspec create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/version.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/snippet_metadata_google.iam.credentials.v1.json create mode 100644 owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb create mode 100644 owl-bot-staging/google-iam-credentials-v1/test/helper.rb create mode 100644 owl-bot-staging/google-iam-credentials/.gitignore create mode 100644 owl-bot-staging/google-iam-credentials/.repo-metadata.json create mode 100644 owl-bot-staging/google-iam-credentials/.rubocop.yml create mode 100644 owl-bot-staging/google-iam-credentials/.toys.rb create mode 100644 owl-bot-staging/google-iam-credentials/.yardopts create mode 100644 owl-bot-staging/google-iam-credentials/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-iam-credentials/CHANGELOG.md create mode 100644 owl-bot-staging/google-iam-credentials/Gemfile create mode 100644 owl-bot-staging/google-iam-credentials/LICENSE.md create mode 100644 owl-bot-staging/google-iam-credentials/README.md create mode 100644 owl-bot-staging/google-iam-credentials/Rakefile create mode 100644 owl-bot-staging/google-iam-credentials/google-iam-credentials.gemspec create mode 100644 owl-bot-staging/google-iam-credentials/lib/google-iam-credentials.rb create mode 100644 owl-bot-staging/google-iam-credentials/lib/google/iam/credentials.rb create mode 100644 owl-bot-staging/google-iam-credentials/lib/google/iam/credentials/version.rb create mode 100644 owl-bot-staging/google-iam-credentials/test/google/iam/credentials/client_test.rb create mode 100644 owl-bot-staging/google-iam-credentials/test/google/iam/credentials/version_test.rb create mode 100644 owl-bot-staging/google-iam-credentials/test/helper.rb diff --git a/owl-bot-staging/google-cloud-vmware_engine/.gitignore b/owl-bot-staging/google-cloud-vmware_engine/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-vmware_engine/.repo-metadata.json b/owl-bot-staging/google-cloud-vmware_engine/.repo-metadata.json new file mode 100644 index 000000000000..de963dcd4fec --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "vmwareengine.googleapis.com", + "api_shortname": "vmwareengine", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine/latest", + "distribution_name": "google-cloud-vmware_engine", + "is_cloud": true, + "language": "ruby", + "name": "vmwareengine", + "name_pretty": "Google Cloud VMware Engine API", + "product_documentation": "https://cloud.google.com/vmware-engine/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Google Cloud VMware Engine is a fully managed service that lets you run the VMware platform in Google Cloud. VMware Engine provides you with VMware operational continuity so you can benefit from a cloud consumption model and lower your total cost of ownership. VMware Engine also offers on-demand provisioning, pay-as-you-grow, and capacity optimization.", + "ruby-cloud-product-url": "https://cloud.google.com/vmware-engine/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-vmware_engine/.rubocop.yml b/owl-bot-staging/google-cloud-vmware_engine/.rubocop.yml new file mode 100644 index 000000000000..d12092f1da92 --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-vmware_engine.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-cloud-vmware_engine.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-vmware_engine/.toys.rb b/owl-bot-staging/google-cloud-vmware_engine/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-cloud-vmware_engine/.yardopts b/owl-bot-staging/google-cloud-vmware_engine/.yardopts new file mode 100644 index 000000000000..024cf705516a --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Google Cloud VMware Engine API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-vmware_engine/AUTHENTICATION.md b/owl-bot-staging/google-cloud-vmware_engine/AUTHENTICATION.md new file mode 100644 index 000000000000..374984db0f3a --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-vmware_engine library is to use +[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). +To review all of your authentication options, see [Credentials lookup](#credential-lookup). + +## Quickstart + +The following example shows how to set up authentication for a local development +environment with your user credentials. + +**NOTE:** This method is _not_ recommended for running in production. User credentials +should be used only during development. + +1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). +2. Set up a local ADC file with your user credentials: + +```sh +gcloud auth application-default login +``` + +3. Write code as if already authenticated. + +For more information about setting up authentication for a local development environment, see +[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). + +## Credential Lookup + +The google-cloud-vmware_engine library provides several mechanisms to configure your system. +Generally, using Application Default Credentials to facilitate automatic +credentials discovery is the easist method. But if you need to explicitly specify +credentials, there are several methods available to you. + +Credentials are accepted in the following ways, in the following order or precedence: + +1. Credentials specified in method arguments +2. Credentials specified in configuration +3. Credentials pointed to or included in environment variables +4. Credentials found in local ADC file +5. Credentials returned by the metadata server for the attached service account (GCP) + +### Configuration + +You can configure a path to a JSON credentials file, either for an individual client object or +globally, for all client objects. The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +To configure a credentials file for an individual client initialization: + +```ruby +require "google/cloud/vmware_engine" + +client = Google::Cloud::VmwareEngine.vmware_engine do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/vmware_engine" + +Google::Cloud::VmwareEngine.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::VmwareEngine.vmware_engine +``` + +### 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-vmware_engine +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/cloud/vmware_engine" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::VmwareEngine.vmware_engine +``` + +### 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-vmware_engine/CHANGELOG.md b/owl-bot-staging/google-cloud-vmware_engine/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-vmware_engine/Gemfile b/owl-bot-staging/google-cloud-vmware_engine/Gemfile new file mode 100644 index 000000000000..af087997847e --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-vmware_engine-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-vmware_engine.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-vmware_engine/LICENSE.md b/owl-bot-staging/google-cloud-vmware_engine/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-cloud-vmware_engine/README.md b/owl-bot-staging/google-cloud-vmware_engine/README.md new file mode 100644 index 000000000000..d5633c7d9ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Google Cloud VMware Engine API + +API Client library for the Google Cloud VMware Engine API + +Google Cloud VMware Engine is a fully managed service that lets you run the VMware platform in Google Cloud. VMware Engine provides you with VMware operational continuity so you can benefit from a cloud consumption model and lower your total cost of ownership. VMware Engine also offers on-demand provisioning, pay-as-you-grow, and capacity optimization. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-vmware_engine-v*`. +The gem `google-cloud-vmware_engine` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine/latest) +for this library, google-cloud-vmware_engine, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-vmware_engine-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/vmware-engine/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-vmware_engine +``` + +In order to use this library, you first need to go through the following steps: + +1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) +1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) +1. [Enable the API.](https://console.cloud.google.com/apis/library/vmwareengine.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/vmware_engine" + +client = Google::Cloud::VmwareEngine.vmware_engine +request = ::Google::Cloud::VmwareEngine::V1::ListPrivateCloudsRequest.new # (request fields as keyword arguments...) +response = client.list_private_clouds request +``` + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-vmware_engine-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-vmware_engine`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-vmware_engine-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-vmware_engine`. +The main client is recommended because it will embody the best practices for +accessing the service, and may also provide more convenient interfaces or +tighter integration into frameworks and third-party libraries. In addition, the +documentation and samples published by Google will generally demonstrate use of +the main client. + +### Why would I want to use a versioned client? + +You can use a versioned client if you are content with a possibly lower-level +class interface, you explicitly want to avoid features provided by the main +client, or you want to access a specific service version not be covered by the +main client. You can identify versioned client gems because the service version +is part of the name, e.g. `google-cloud-vmware_engine-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-vmware_engine/Rakefile b/owl-bot-staging/google-cloud-vmware_engine/Rakefile new file mode 100644 index 000000000000..7c56d29df96b --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-vmware_engine 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/vmware_engine/v1/vmware_engine/credentials" + ::Google::Cloud::VmwareEngine::V1::VmwareEngine::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-vmware_engine gem has no acceptance tests." + end + end + + desc "Run acceptance cleanup." + task :cleanup do + end +end + +task :samples do + Rake::Task["samples:latest"].invoke +end + +namespace :samples do + task :latest do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-vmware_engine gem has no samples to test." + end + end + + task :master do + if File.directory? "samples" + Dir.chdir "samples" do + Bundler.with_clean_env do + ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" + sh "bundle update" + sh "bundle exec rake test" + end + end + else + puts "The google-cloud-vmware_engine gem has no samples to test." + end + end +end + +require "yard" +require "yard/rake/yardoc_task" +YARD::Rake::YardocTask.new do |y| + y.options << "--fail-on-warning" +end + +desc "Run yard-doctest example tests." +task :doctest do + puts "The google-cloud-vmware_engine gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-vmware_engine" + header "google-cloud-vmware_engine rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-vmware_engine yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-vmware_engine test", "*" + Rake::Task[:test].invoke +end + +namespace :ci do + desc "Run the CI build, with smoke tests." + task :smoke_test do + Rake::Task[:ci].invoke + header "google-cloud-vmware_engine smoke_test", "*" + Rake::Task[:smoke_test].invoke + end + desc "Run the CI build, with acceptance tests." + task :acceptance do + Rake::Task[:ci].invoke + header "google-cloud-vmware_engine acceptance", "*" + Rake::Task[:acceptance].invoke + end + task :a do + # This is a handy shortcut to save typing + Rake::Task["ci:acceptance"].invoke + end +end + +task default: :test + +def header str, token = "#" + line_length = str.length + 8 + puts "" + puts token * line_length + puts "#{token * 3} #{str} #{token * 3}" + puts token * line_length + puts "" +end diff --git a/owl-bot-staging/google-cloud-vmware_engine/google-cloud-vmware_engine.gemspec b/owl-bot-staging/google-cloud-vmware_engine/google-cloud-vmware_engine.gemspec new file mode 100644 index 000000000000..42944bd6bf89 --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/google-cloud-vmware_engine.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/vmware_engine/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-vmware_engine" + gem.version = Google::Cloud::VmwareEngine::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Google Cloud VMware Engine is a fully managed service that lets you run the VMware platform in Google Cloud. VMware Engine provides you with VMware operational continuity so you can benefit from a cloud consumption model and lower your total cost of ownership. VMware Engine also offers on-demand provisioning, pay-as-you-grow, and capacity optimization." + gem.summary = "API Client library for the Google Cloud VMware Engine API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-vmware_engine-v1", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-vmware_engine/lib/google-cloud-vmware_engine.rb b/owl-bot-staging/google-cloud-vmware_engine/lib/google-cloud-vmware_engine.rb new file mode 100644 index 000000000000..b45dc8640fac --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/lib/google-cloud-vmware_engine.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/vmware_engine" unless defined? Google::Cloud::VmwareEngine::VERSION diff --git a/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine.rb b/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine.rb new file mode 100644 index 000000000000..6d195fb23f8e --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/vmware_engine/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :vmware_engine do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module VmwareEngine + ## + # Create a new client object for VmwareEngine. + # + # By default, this returns an instance of + # [Google::Cloud::VmwareEngine::V1::VmwareEngine::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine-v1/latest/Google-Cloud-VmwareEngine-V1-VmwareEngine-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the VmwareEngine service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the VmwareEngine service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::VmwareEngine.vmware_engine_available?}. + # + # ## About VmwareEngine + # + # VMwareEngine manages VMware's private clusters in the Cloud. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.vmware_engine version: :v1, transport: :grpc, &block + require "google/cloud/vmware_engine/#{version.to_s.downcase}" + + package_name = Google::Cloud::VmwareEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::VmwareEngine.const_get(package_name).const_get(:VmwareEngine) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the VmwareEngine service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::VmwareEngine.vmware_engine}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the VmwareEngine service, + # or if the versioned client gem needs an update to support the VmwareEngine service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.vmware_engine_available? version: :v1, transport: :grpc + require "google/cloud/vmware_engine/#{version.to_s.downcase}" + package_name = Google::Cloud::VmwareEngine + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::VmwareEngine.const_get package_name + return false unless service_module.const_defined? :VmwareEngine + service_module = service_module.const_get :VmwareEngine + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-vmware_engine library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.vmware_engine if block_given? + + ::Google::Cloud.configure.vmware_engine + end + end + end +end + +helper_path = ::File.join __dir__, "vmware_engine", "helpers.rb" +require "google/cloud/vmware_engine/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine/version.rb b/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine/version.rb new file mode 100644 index 000000000000..8883c81155ce --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module VmwareEngine + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/client_test.rb b/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/client_test.rb new file mode 100644 index 000000000000..cf4b478d36cf --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/vmware_engine" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::VmwareEngine::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_vmware_engine_grpc + skip unless Google::Cloud::VmwareEngine.vmware_engine_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::VmwareEngine.vmware_engine transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::VmwareEngine::V1::VmwareEngine::Client, client + end + end + + def test_vmware_engine_rest + skip unless Google::Cloud::VmwareEngine.vmware_engine_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::VmwareEngine.vmware_engine transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::VmwareEngine::V1::VmwareEngine::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/version_test.rb b/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/version_test.rb new file mode 100644 index 000000000000..fc85dc11ef19 --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/vmware_engine/version" + +class Google::Cloud::VmwareEngine::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::VmwareEngine::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-vmware_engine/test/helper.rb b/owl-bot-staging/google-cloud-vmware_engine/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-vmware_engine/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/.gitignore b/owl-bot-staging/google-cloud-vpc_access-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-vpc_access-v1/.repo-metadata.json new file mode 100644 index 000000000000..555203aea0e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "vpcaccess.googleapis.com", + "api_shortname": "vpcaccess", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest", + "distribution_name": "google-cloud-vpc_access-v1", + "is_cloud": true, + "language": "ruby", + "name": "vpcaccess", + "name_pretty": "Serverless VPC Access V1 API", + "product_documentation": "https://cloud.google.com/vpc/docs/serverless-vpc-access", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address. Note that google-cloud-vpc_access-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-vpc_access instead. See the readme for more details.", + "ruby-cloud-env-prefix": "VPC_ACCESS", + "ruby-cloud-product-url": "https://cloud.google.com/vpc/docs/serverless-vpc-access", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/.rubocop.yml b/owl-bot-staging/google-cloud-vpc_access-v1/.rubocop.yml new file mode 100644 index 000000000000..5d9ab3a8534f --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-vpc_access-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-vpc_access-v1.rb" diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/.toys.rb b/owl-bot-staging/google-cloud-vpc_access-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/.yardopts b/owl-bot-staging/google-cloud-vpc_access-v1/.yardopts new file mode 100644 index 000000000000..18b7b8796058 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Serverless VPC Access 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-vpc_access-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-vpc_access-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..0a3414fbad29 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-vpc_access-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-vpc_access-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/vpc_access/v1" + +client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/vpc_access/v1" + +::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::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-vpc_access-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/vpc_access/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::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-vpc_access-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-vpc_access-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/Gemfile b/owl-bot-staging/google-cloud-vpc_access-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/LICENSE.md b/owl-bot-staging/google-cloud-vpc_access-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/README.md b/owl-bot-staging/google-cloud-vpc_access-v1/README.md new file mode 100644 index 000000000000..f3ab3b89c390 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Serverless VPC Access V1 API + +API for managing VPC access connectors. + +Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Serverless VPC Access V1 API. Most users should consider using +the main client gem, +[google-cloud-vpc_access](https://rubygems.org/gems/google-cloud-vpc_access). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-vpc_access-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/vpcaccess.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/vpc_access/v1" + +client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new +request = ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new # (request fields as keyword arguments...) +response = client.create_connector request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/vpc/docs/serverless-vpc-access) +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/vpc_access/v1" +require "logger" + +client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-vpc_access`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-vpc_access-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-vpc_access`. +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-vpc_access-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-vpc_access-v1/Rakefile b/owl-bot-staging/google-cloud-vpc_access-v1/Rakefile new file mode 100644 index 000000000000..e8bc005d5a03 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["VPC_ACCESS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["VPC_ACCESS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["VPC_ACCESS_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 VPC_ACCESS_TEST_PROJECT=test123 VPC_ACCESS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/vpc_access/v1/vpc_access_service/credentials" + ::Google::Cloud::VpcAccess::V1::VpcAccessService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["VPC_ACCESS_PROJECT"] = project + ENV["VPC_ACCESS_TEST_PROJECT"] = project + ENV["VPC_ACCESS_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-vpc_access-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-vpc_access-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-vpc_access-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-vpc_access-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-vpc_access-v1" + header "google-cloud-vpc_access-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-vpc_access-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-vpc_access-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-vpc_access-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-vpc_access-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-vpc_access-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-vpc_access-v1/gapic_metadata.json new file mode 100644 index 000000000000..2dae0b91baaf --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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.vpcaccess.v1", + "libraryPackage": "::Google::Cloud::VpcAccess::V1", + "services": { + "VpcAccessService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client", + "rpcs": { + "CreateConnector": { + "methods": [ + "create_connector" + ] + }, + "GetConnector": { + "methods": [ + "get_connector" + ] + }, + "ListConnectors": { + "methods": [ + "list_connectors" + ] + }, + "DeleteConnector": { + "methods": [ + "delete_connector" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/google-cloud-vpc_access-v1.gemspec b/owl-bot-staging/google-cloud-vpc_access-v1/google-cloud-vpc_access-v1.gemspec new file mode 100644 index 000000000000..93cc867ae5b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/google-cloud-vpc_access-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/vpc_access/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-vpc_access-v1" + gem.version = Google::Cloud::VpcAccess::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address. Note that google-cloud-vpc_access-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-vpc_access instead. See the readme for more details." + gem.summary = "API for managing VPC access connectors." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google-cloud-vpc_access-v1.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google-cloud-vpc_access-v1.rb new file mode 100644 index 000000000000..dd22501e9404 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google-cloud-vpc_access-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/vpc_access/v1" diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1.rb new file mode 100644 index 000000000000..927136b99d80 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/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/vpc_access/v1/vpc_access_service" +require "google/cloud/vpc_access/v1/version" + +module Google + module Cloud + module VpcAccess + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/vpc_access/v1" + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/vpc_access/v1" + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/vpc_access/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/bindings_override.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/bindings_override.rb new file mode 100644 index 000000000000..3da4e39390e9 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/bindings_override.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module VpcAccess + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/vpc_access/v1/rest" + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "VpcAccess"] + parent_config = while namespace.any? + parent_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.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-vpc_access-v1/lib/google/cloud/vpc_access/v1/rest.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/rest.rb new file mode 100644 index 000000000000..998323ec2725 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/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/vpc_access/v1/vpc_access_service/rest" +require "google/cloud/vpc_access/v1/bindings_override" +require "google/cloud/vpc_access/v1/version" + +module Google + module Cloud + module VpcAccess + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/vpc_access/v1/rest" + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/version.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/version.rb new file mode 100644 index 000000000000..3348f75044ad --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/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 VpcAccess + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service.rb new file mode 100644 index 000000000000..b1274c5f41a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_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/vpc_access/v1/version" + +require "google/cloud/vpc_access/v1/vpc_access_service/credentials" +require "google/cloud/vpc_access/v1/vpc_access_service/paths" +require "google/cloud/vpc_access/v1/vpc_access_service/operations" +require "google/cloud/vpc_access/v1/vpc_access_service/client" +require "google/cloud/vpc_access/v1/vpc_access_service/rest" + +module Google + module Cloud + module VpcAccess + module V1 + ## + # Serverless VPC Access API allows users to create and manage connectors for + # App Engine, Cloud Functions and Cloud Run to have internal connections to + # Virtual Private Cloud networks. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/vpc_access/v1/vpc_access_service" + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/vpc_access/v1/vpc_access_service/rest" + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + module VpcAccessService + end + end + end + end +end + +helper_path = ::File.join __dir__, "vpc_access_service", "helpers.rb" +require "google/cloud/vpc_access/v1/vpc_access_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/client.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/client.rb new file mode 100644 index 000000000000..3ec4e8d43b00 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/client.rb @@ -0,0 +1,830 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/vpcaccess/v1/vpc_access_pb" +require "google/cloud/location" + +module Google + module Cloud + module VpcAccess + module V1 + module VpcAccessService + ## + # Client for the VpcAccessService service. + # + # Serverless VPC Access API allows users to create and manage connectors for + # App Engine, Cloud Functions and Cloud Run to have internal connections to + # Virtual Private Cloud networks. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vpcaccess.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :vpc_access_service_stub + + ## + # Configure the VpcAccessService Client class. + # + # See {::Google::Cloud::VpcAccess::V1::VpcAccessService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VpcAccessService clients + # ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "VpcAccess", "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: [14, 2] + } + + default_config.rpcs.create_connector.timeout = 60.0 + + default_config.rpcs.get_connector.timeout = 60.0 + + default_config.rpcs.list_connectors.timeout = 60.0 + + default_config.rpcs.delete_connector.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VpcAccessService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::VpcAccess::V1::VpcAccessService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @vpc_access_service_stub.universe_domain + end + + ## + # Create a new VpcAccessService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VpcAccessService 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/vpcaccess/v1/vpc_access_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 + + @vpc_access_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::VpcAccess::V1::VpcAccessService::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 + ) + + @vpc_access_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 = @vpc_access_service_stub.endpoint + config.universe_domain = @vpc_access_service_stub.universe_domain + config.logger = @vpc_access_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VpcAccess::V1::VpcAccessService::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 + @vpc_access_service_stub.logger + end + + # Service calls + + ## + # Creates a Serverless VPC Access connector, returns an operation. + # + # @overload create_connector(request, options = nil) + # Pass arguments to `create_connector` via a request object, either of type + # {::Google::Cloud::VpcAccess::V1::CreateConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VpcAccess::V1::CreateConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_connector(parent: nil, connector_id: nil, connector: nil) + # Pass arguments to `create_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 project and location in which the configuration should be created, + # specified in the format `projects/*/locations/*`. + # @param connector_id [::String] + # Required. The ID to use for this connector. + # @param connector [::Google::Cloud::VpcAccess::V1::Connector, ::Hash] + # Required. 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/vpc_access/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new + # + # # Call the create_connector method. + # result = client.create_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_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_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::VpcAccess::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_access_service_stub.call_rpc :create_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 + + ## + # Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource + # does not exist. + # + # @overload get_connector(request, options = nil) + # Pass arguments to `get_connector` via a request object, either of type + # {::Google::Cloud::VpcAccess::V1::GetConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VpcAccess::V1::GetConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_connector(name: nil) + # Pass arguments to `get_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. Name of a Serverless VPC Access connector to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::VpcAccess::V1::Connector] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::VpcAccess::V1::Connector] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vpc_access/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VpcAccess::V1::GetConnectorRequest.new + # + # # Call the get_connector method. + # result = client.get_connector request + # + # # The returned object is of type Google::Cloud::VpcAccess::V1::Connector. + # p result + # + def get_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::GetConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_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::VpcAccess::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_access_service_stub.call_rpc :get_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 + + ## + # Lists Serverless VPC Access connectors. + # + # @overload list_connectors(request, options = nil) + # Pass arguments to `list_connectors` via a request object, either of type + # {::Google::Cloud::VpcAccess::V1::ListConnectorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VpcAccess::V1::ListConnectorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_connectors(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_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 project and location from which the routes should be listed. + # @param page_size [::Integer] + # Maximum number of functions to return per call. + # @param page_token [::String] + # Continuation token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/vpc_access/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new + # + # # Call the list_connectors method. + # result = client.list_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::VpcAccess::V1::Connector. + # p item + # end + # + def list_connectors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_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::VpcAccess::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_connectors.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_connectors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_access_service_stub.call_rpc :list_connectors, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @vpc_access_service_stub, :list_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 + + ## + # Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the + # resource does not exist. + # + # @overload delete_connector(request, options = nil) + # Pass arguments to `delete_connector` via a request object, either of type + # {::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_connector(name: nil) + # Pass arguments to `delete_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. Name of a Serverless VPC Access connector 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/vpc_access/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new + # + # # Call the delete_connector method. + # result = client.delete_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_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_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::VpcAccess::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_connector.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_access_service_stub.call_rpc :delete_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 + + ## + # Configuration class for the VpcAccessService API. + # + # This class represents the configuration for VpcAccessService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::VpcAccess::V1::VpcAccessService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_connector to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_connector.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_connector.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::VpcAccess::V1::VpcAccessService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "vpcaccess.googleapis.com" + + config_attr :endpoint, nil, ::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 VpcAccessService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connector + ## + # RPC-specific configuration for `get_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connector + ## + # RPC-specific configuration for `list_connectors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connectors + ## + # RPC-specific configuration for `delete_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connector + + # @private + def initialize parent_rpcs = nil + create_connector_config = parent_rpcs.create_connector if parent_rpcs.respond_to? :create_connector + @create_connector = ::Gapic::Config::Method.new create_connector_config + get_connector_config = parent_rpcs.get_connector if parent_rpcs.respond_to? :get_connector + @get_connector = ::Gapic::Config::Method.new get_connector_config + list_connectors_config = parent_rpcs.list_connectors if parent_rpcs.respond_to? :list_connectors + @list_connectors = ::Gapic::Config::Method.new list_connectors_config + delete_connector_config = parent_rpcs.delete_connector if parent_rpcs.respond_to? :delete_connector + @delete_connector = ::Gapic::Config::Method.new delete_connector_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/credentials.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/credentials.rb new file mode 100644 index 000000000000..cb40b03f48ad --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_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 VpcAccess + module V1 + module VpcAccessService + # Credentials for the VpcAccessService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "VPC_ACCESS_CREDENTIALS", + "VPC_ACCESS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "VPC_ACCESS_CREDENTIALS_JSON", + "VPC_ACCESS_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-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/operations.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/operations.rb new file mode 100644 index 000000000000..0680a1f755d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module VpcAccess + module V1 + module VpcAccessService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vpcaccess.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VpcAccessService 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 VpcAccessService 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::VpcAccess::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VpcAccess::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VpcAccess::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::VpcAccess::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::VpcAccess::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "vpcaccess.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/paths.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/paths.rb new file mode 100644 index 000000000000..83b10fa7cd6a --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_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 VpcAccess + module V1 + module VpcAccessService + # Path helper methods for the VpcAccessService API. + module Paths + ## + # Create a fully-qualified Connector resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connectors/{connector}` + # + # @param project [String] + # @param location [String] + # @param connector [String] + # + # @return [::String] + def connector_path project:, location:, 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}/connectors/#{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 diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest.rb new file mode 100644 index 000000000000..4ab07e129b6a --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_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/vpc_access/v1/version" +require "google/cloud/vpc_access/v1/bindings_override" + +require "google/cloud/vpc_access/v1/vpc_access_service/credentials" +require "google/cloud/vpc_access/v1/vpc_access_service/paths" +require "google/cloud/vpc_access/v1/vpc_access_service/rest/operations" +require "google/cloud/vpc_access/v1/vpc_access_service/rest/client" + +module Google + module Cloud + module VpcAccess + module V1 + ## + # Serverless VPC Access API allows users to create and manage connectors for + # App Engine, Cloud Functions and Cloud Run to have internal connections to + # Virtual Private Cloud networks. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/vpc_access/v1/vpc_access_service/rest" + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + module VpcAccessService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/vpc_access/v1/vpc_access_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/client.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/client.rb new file mode 100644 index 000000000000..461527c82fd1 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/client.rb @@ -0,0 +1,767 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/vpcaccess/v1/vpc_access_pb" +require "google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module VpcAccess + module V1 + module VpcAccessService + module Rest + ## + # REST client for the VpcAccessService service. + # + # Serverless VPC Access API allows users to create and manage connectors for + # App Engine, Cloud Functions and Cloud Run to have internal connections to + # Virtual Private Cloud networks. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vpcaccess.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :vpc_access_service_stub + + ## + # Configure the VpcAccessService Client class. + # + # See {::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all VpcAccessService clients + # ::Google::Cloud::VpcAccess::V1::VpcAccessService::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", "VpcAccess", "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: [14, 2] + } + + default_config.rpcs.create_connector.timeout = 60.0 + + default_config.rpcs.get_connector.timeout = 60.0 + + default_config.rpcs.list_connectors.timeout = 60.0 + + default_config.rpcs.delete_connector.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the VpcAccessService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::VpcAccess::V1::VpcAccessService::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 + @vpc_access_service_stub.universe_domain + end + + ## + # Create a new VpcAccessService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the VpcAccessService 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::VpcAccess::V1::VpcAccessService::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 + + @vpc_access_service_stub = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @vpc_access_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 = @vpc_access_service_stub.endpoint + config.universe_domain = @vpc_access_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @vpc_access_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::VpcAccess::V1::VpcAccessService::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 + @vpc_access_service_stub.logger + end + + # Service calls + + ## + # Creates a Serverless VPC Access connector, returns an operation. + # + # @overload create_connector(request, options = nil) + # Pass arguments to `create_connector` via a request object, either of type + # {::Google::Cloud::VpcAccess::V1::CreateConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VpcAccess::V1::CreateConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_connector(parent: nil, connector_id: nil, connector: nil) + # Pass arguments to `create_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 project and location in which the configuration should be created, + # specified in the format `projects/*/locations/*`. + # @param connector_id [::String] + # Required. The ID to use for this connector. + # @param connector [::Google::Cloud::VpcAccess::V1::Connector, ::Hash] + # Required. 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/vpc_access/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new + # + # # Call the create_connector method. + # result = client.create_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_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest + + # Converts hash and nil to an 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_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VpcAccess::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_access_service_stub.create_connector request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Serverless VPC Access connector. Returns NOT_FOUND if the resource + # does not exist. + # + # @overload get_connector(request, options = nil) + # Pass arguments to `get_connector` via a request object, either of type + # {::Google::Cloud::VpcAccess::V1::GetConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VpcAccess::V1::GetConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_connector(name: nil) + # Pass arguments to `get_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. Name of a Serverless VPC Access connector to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::VpcAccess::V1::Connector] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::VpcAccess::V1::Connector] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vpc_access/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VpcAccess::V1::GetConnectorRequest.new + # + # # Call the get_connector method. + # result = client.get_connector request + # + # # The returned object is of type Google::Cloud::VpcAccess::V1::Connector. + # p result + # + def get_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::GetConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VpcAccess::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_access_service_stub.get_connector request, 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 Serverless VPC Access connectors. + # + # @overload list_connectors(request, options = nil) + # Pass arguments to `list_connectors` via a request object, either of type + # {::Google::Cloud::VpcAccess::V1::ListConnectorsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VpcAccess::V1::ListConnectorsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_connectors(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_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 project and location from which the routes should be listed. + # @param page_size [::Integer] + # Maximum number of functions to return per call. + # @param page_token [::String] + # Continuation token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/vpc_access/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new + # + # # Call the list_connectors method. + # result = client.list_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::VpcAccess::V1::Connector. + # p item + # end + # + def list_connectors request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_connectors.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VpcAccess::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_connectors.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_connectors.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_access_service_stub.list_connectors request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @vpc_access_service_stub, :list_connectors, "connectors", request, result, 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 Serverless VPC Access connector. Returns NOT_FOUND if the + # resource does not exist. + # + # @overload delete_connector(request, options = nil) + # Pass arguments to `delete_connector` via a request object, either of type + # {::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_connector(name: nil) + # Pass arguments to `delete_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. Name of a Serverless VPC Access connector 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/vpc_access/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new + # + # # Call the delete_connector method. + # result = client.delete_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_connector request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_connector.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::VpcAccess::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_connector.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_connector.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @vpc_access_service_stub.delete_connector request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 VpcAccessService REST API. + # + # This class represents the configuration for VpcAccessService 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::VpcAccess::V1::VpcAccessService::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_connector to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_connector.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_connector.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "vpcaccess.googleapis.com" + + config_attr :endpoint, nil, ::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 VpcAccessService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :create_connector + ## + # RPC-specific configuration for `get_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :get_connector + ## + # RPC-specific configuration for `list_connectors` + # @return [::Gapic::Config::Method] + # + attr_reader :list_connectors + ## + # RPC-specific configuration for `delete_connector` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_connector + + # @private + def initialize parent_rpcs = nil + create_connector_config = parent_rpcs.create_connector if parent_rpcs.respond_to? :create_connector + @create_connector = ::Gapic::Config::Method.new create_connector_config + get_connector_config = parent_rpcs.get_connector if parent_rpcs.respond_to? :get_connector + @get_connector = ::Gapic::Config::Method.new get_connector_config + list_connectors_config = parent_rpcs.list_connectors if parent_rpcs.respond_to? :list_connectors + @list_connectors = ::Gapic::Config::Method.new list_connectors_config + delete_connector_config = parent_rpcs.delete_connector if parent_rpcs.respond_to? :delete_connector + @delete_connector = ::Gapic::Config::Method.new delete_connector_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/operations.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/operations.rb new file mode 100644 index 000000000000..55477e7f6600 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module VpcAccess + module V1 + module VpcAccessService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "vpcaccess.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the VpcAccessService 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 VpcAccessService 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::VpcAccess::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::VpcAccess::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::VpcAccess::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::VpcAccess::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "vpcaccess.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub.rb new file mode 100644 index 000000000000..e7aeac787a8c --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub.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! + +require "google/cloud/vpcaccess/v1/vpc_access_pb" + +module Google + module Cloud + module VpcAccess + module V1 + module VpcAccessService + module Rest + ## + # REST service stub for the VpcAccessService 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_connector REST call + # + # @param request_pb [::Google::Cloud::VpcAccess::V1::CreateConnectorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_connector_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_connector REST call + # + # @param request_pb [::Google::Cloud::VpcAccess::V1::GetConnectorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::VpcAccess::V1::Connector] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::VpcAccess::V1::Connector] + # A result object deserialized from the server's reply + def get_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_connector_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::VpcAccess::V1::Connector.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_connectors REST call + # + # @param request_pb [::Google::Cloud::VpcAccess::V1::ListConnectorsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::VpcAccess::V1::ListConnectorsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::VpcAccess::V1::ListConnectorsResponse] + # A result object deserialized from the server's reply + def list_connectors request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_connectors_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_connectors", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::VpcAccess::V1::ListConnectorsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_connector REST call + # + # @param request_pb [::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_connector request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_connector_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_connector", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the create_connector REST call + # + # @param request_pb [::Google::Cloud::VpcAccess::V1::CreateConnectorRequest] + # 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_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/connectors", + body: "connector", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_connector REST call + # + # @param request_pb [::Google::Cloud::VpcAccess::V1::GetConnectorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_connectors REST call + # + # @param request_pb [::Google::Cloud::VpcAccess::V1::ListConnectorsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_connectors_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/connectors", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_connector REST call + # + # @param request_pb [::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_connector_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/connectors/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_pb.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_pb.rb new file mode 100644 index 000000000000..9b4bc81b3537 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/vpcaccess/v1/vpc_access.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/vpcaccess/v1/vpc_access.proto\x12\x19google.cloud.vpcaccess.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\"\xc8\x04\n\tConnector\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.cloud.vpcaccess.v1.Connector.StateB\x03\xe0\x41\x03\x12\x16\n\x0emin_throughput\x18\x05 \x01(\x05\x12\x16\n\x0emax_throughput\x18\x06 \x01(\x05\x12\x1f\n\x12\x63onnected_projects\x18\x07 \x03(\tB\x03\xe0\x41\x03\x12;\n\x06subnet\x18\x08 \x01(\x0b\x32+.google.cloud.vpcaccess.v1.Connector.Subnet\x12\x14\n\x0cmachine_type\x18\n \x01(\t\x12\x15\n\rmin_instances\x18\x0b \x01(\x05\x12\x15\n\rmax_instances\x18\x0c \x01(\x05\x1a*\n\x06Subnet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\"^\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:g\xea\x41\x64\n\"vpcaccess.googleapis.com/Connector\x12>projects/{project}/locations/{location}/connectors/{connector}\"\xac\x01\n\x16\x43reateConnectorRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x19\n\x0c\x63onnector_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\tconnector\x18\x03 \x01(\x0b\x32$.google.cloud.vpcaccess.v1.ConnectorB\x03\xe0\x41\x02\"O\n\x13GetConnectorRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\"y\n\x15ListConnectorsRequest\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\x16ListConnectorsResponse\x12\x38\n\nconnectors\x18\x01 \x03(\x0b\x32$.google.cloud.vpcaccess.v1.Connector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x16\x44\x65leteConnectorRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\"\xcd\x01\n\x11OperationMetadata\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x06target\x18\x05 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"vpcaccess.googleapis.com/Connector2\xfc\x06\n\x10VpcAccessService\x12\xe8\x01\n\x0f\x43reateConnector\x12\x31.google.cloud.vpcaccess.v1.CreateConnectorRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x1e\n\tConnector\x12\x11OperationMetadata\xda\x41\x1dparent,connector_id,connector\x82\xd3\xe4\x93\x02;\"./v1/{parent=projects/*/locations/*}/connectors:\tconnector\x12\xa3\x01\n\x0cGetConnector\x12..google.cloud.vpcaccess.v1.GetConnectorRequest\x1a$.google.cloud.vpcaccess.v1.Connector\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/connectors/*}\x12\xb6\x01\n\x0eListConnectors\x12\x30.google.cloud.vpcaccess.v1.ListConnectorsRequest\x1a\x31.google.cloud.vpcaccess.v1.ListConnectorsResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/connectors\x12\xcf\x01\n\x0f\x44\x65leteConnector\x12\x31.google.cloud.vpcaccess.v1.DeleteConnectorRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/connectors/*}\x1aL\xca\x41\x18vpcaccess.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc5\x01\n\x1d\x63om.google.cloud.vpcaccess.v1B\x0eVpcAccessProtoP\x01Z;cloud.google.com/go/vpcaccess/apiv1/vpcaccesspb;vpcaccesspb\xaa\x02\x19Google.Cloud.VpcAccess.V1\xca\x02\x19Google\\Cloud\\VpcAccess\\V1\xea\x02\x1cGoogle::Cloud::VpcAccess::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module VpcAccess + module V1 + Connector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.Connector").msgclass + Connector::Subnet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.Connector.Subnet").msgclass + Connector::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.Connector.State").enummodule + CreateConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.CreateConnectorRequest").msgclass + GetConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.GetConnectorRequest").msgclass + ListConnectorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.ListConnectorsRequest").msgclass + ListConnectorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.ListConnectorsResponse").msgclass + DeleteConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.DeleteConnectorRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_services_pb.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_services_pb.rb new file mode 100644 index 000000000000..f53da11be9ff --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_services_pb.rb @@ -0,0 +1,55 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/vpcaccess/v1/vpc_access.proto for package 'Google.Cloud.VpcAccess.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/vpcaccess/v1/vpc_access_pb' + +module Google + module Cloud + module VpcAccess + module V1 + module VpcAccessService + # Serverless VPC Access API allows users to create and manage connectors for + # App Engine, Cloud Functions and Cloud Run to have internal connections to + # Virtual Private Cloud networks. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.vpcaccess.v1.VpcAccessService' + + # Creates a Serverless VPC Access connector, returns an operation. + rpc :CreateConnector, ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest, ::Google::Longrunning::Operation + # Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource + # does not exist. + rpc :GetConnector, ::Google::Cloud::VpcAccess::V1::GetConnectorRequest, ::Google::Cloud::VpcAccess::V1::Connector + # Lists Serverless VPC Access connectors. + rpc :ListConnectors, ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest, ::Google::Cloud::VpcAccess::V1::ListConnectorsResponse + # Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the + # resource does not exist. + rpc :DeleteConnector, ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/README.md new file mode 100644 index 000000000000..9bc43f1e670f --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Serverless VPC Access 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-vpc_access-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/cloud/vpcaccess/v1/vpc_access.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/cloud/vpcaccess/v1/vpc_access.rb new file mode 100644 index 000000000000..c0249c575e05 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/cloud/vpcaccess/v1/vpc_access.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module VpcAccess + module V1 + # Definition of a Serverless VPC Access connector. + # @!attribute [rw] name + # @return [::String] + # The resource name in the format `projects/*/locations/*/connectors/*`. + # @!attribute [rw] network + # @return [::String] + # Name of a VPC network. + # @!attribute [rw] ip_cidr_range + # @return [::String] + # The range of internal addresses that follows RFC 4632 notation. + # Example: `10.132.0.0/28`. + # @!attribute [r] state + # @return [::Google::Cloud::VpcAccess::V1::Connector::State] + # Output only. State of the VPC access connector. + # @!attribute [rw] min_throughput + # @return [::Integer] + # Minimum throughput of the connector in Mbps. Default and min is 200. + # @!attribute [rw] max_throughput + # @return [::Integer] + # Maximum throughput of the connector in Mbps. Default is 300, max is 1000. + # @!attribute [r] connected_projects + # @return [::Array<::String>] + # Output only. List of projects using the connector. + # @!attribute [rw] subnet + # @return [::Google::Cloud::VpcAccess::V1::Connector::Subnet] + # The subnet in which to house the VPC Access Connector. + # @!attribute [rw] machine_type + # @return [::String] + # Machine type of VM Instance underlying connector. Default is e2-micro + # @!attribute [rw] min_instances + # @return [::Integer] + # Minimum value of instances in autoscaling group underlying the connector. + # @!attribute [rw] max_instances + # @return [::Integer] + # Maximum value of instances in autoscaling group underlying the connector. + class Connector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The subnet in which to house the connector + # @!attribute [rw] name + # @return [::String] + # Subnet name (relative, not fully qualified). + # E.g. if the full subnet selfLink is + # https://compute.googleapis.com/compute/v1/projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetName} + # the correct input for this field would be \\{subnetName} + # @!attribute [rw] project_id + # @return [::String] + # Project in which the subnet exists. + # If not set, this project is assumed to be the project for which + # the connector create request was issued. + class Subnet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State of a connector. + module State + # Invalid state. + STATE_UNSPECIFIED = 0 + + # Connector is deployed and ready to receive traffic. + READY = 1 + + # An Insert operation is in progress. Transient condition. + CREATING = 2 + + # A Delete operation is in progress. Transient condition. + DELETING = 3 + + # Connector is in a bad state, manual deletion recommended. + ERROR = 4 + + # The connector is being updated. + UPDATING = 5 + end + end + + # Request for creating a Serverless VPC Access connector. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location in which the configuration should be created, + # specified in the format `projects/*/locations/*`. + # @!attribute [rw] connector_id + # @return [::String] + # Required. The ID to use for this connector. + # @!attribute [rw] connector + # @return [::Google::Cloud::VpcAccess::V1::Connector] + # Required. Resource to create. + class CreateConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for getting a Serverless VPC Access connector. + # @!attribute [rw] name + # @return [::String] + # Required. Name of a Serverless VPC Access connector to get. + class GetConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for listing Serverless VPC Access connectors in a location. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the routes should be listed. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of functions to return per call. + # @!attribute [rw] page_token + # @return [::String] + # Continuation token. + class ListConnectorsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for listing Serverless VPC Access connectors. + # @!attribute [rw] connectors + # @return [::Array<::Google::Cloud::VpcAccess::V1::Connector>] + # List of Serverless VPC Access connectors. + # @!attribute [rw] next_page_token + # @return [::String] + # Continuation token. + class ListConnectorsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a Serverless VPC Access connector. + # @!attribute [rw] name + # @return [::String] + # Required. Name of a Serverless VPC Access connector to delete. + class DeleteConnectorRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for google.longrunning.Operation. + # @!attribute [r] method + # @return [::String] + # Output only. Method that initiated the operation e.g. + # google.cloud.vpcaccess.v1.Connectors.CreateConnector. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the operation completed. + # @!attribute [r] target + # @return [::String] + # Output only. Name of the resource that this operation is acting on e.g. + # projects/my-project/locations/us-central1/connectors/v1. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/Gemfile new file mode 100644 index 000000000000..2797ddedd3b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1", path: "../" +else + gem "google-cloud-vpc_access-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-vpc_access-v1/snippets/snippet_metadata_google.cloud.vpcaccess.v1.json b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/snippet_metadata_google.cloud.vpcaccess.v1.json new file mode 100644 index 000000000000..fe9e53321b02 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/snippet_metadata_google.cloud.vpcaccess.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-cloud-vpc_access-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.vpcaccess.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync", + "title": "Snippet for the create_connector call in the VpcAccessService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VpcAccess::V1::VpcAccessService::Client#create_connector.", + "file": "vpc_access_service/create_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_connector", + "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client#create_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VpcAccess::V1::CreateConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VpcAccessService::Client", + "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client" + }, + "method": { + "short_name": "CreateConnector", + "full_name": "google.cloud.vpcaccess.v1.VpcAccessService.CreateConnector", + "service": { + "short_name": "VpcAccessService", + "full_name": "google.cloud.vpcaccess.v1.VpcAccessService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "vpcaccess_v1_generated_VpcAccessService_GetConnector_sync", + "title": "Snippet for the get_connector call in the VpcAccessService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VpcAccess::V1::VpcAccessService::Client#get_connector.", + "file": "vpc_access_service/get_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_connector", + "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client#get_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VpcAccess::V1::GetConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::VpcAccess::V1::Connector", + "client": { + "short_name": "VpcAccessService::Client", + "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client" + }, + "method": { + "short_name": "GetConnector", + "full_name": "google.cloud.vpcaccess.v1.VpcAccessService.GetConnector", + "service": { + "short_name": "VpcAccessService", + "full_name": "google.cloud.vpcaccess.v1.VpcAccessService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync", + "title": "Snippet for the list_connectors call in the VpcAccessService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VpcAccess::V1::VpcAccessService::Client#list_connectors.", + "file": "vpc_access_service/list_connectors.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_connectors", + "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client#list_connectors", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VpcAccess::V1::ListConnectorsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::VpcAccess::V1::ListConnectorsResponse", + "client": { + "short_name": "VpcAccessService::Client", + "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client" + }, + "method": { + "short_name": "ListConnectors", + "full_name": "google.cloud.vpcaccess.v1.VpcAccessService.ListConnectors", + "service": { + "short_name": "VpcAccessService", + "full_name": "google.cloud.vpcaccess.v1.VpcAccessService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync", + "title": "Snippet for the delete_connector call in the VpcAccessService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VpcAccess::V1::VpcAccessService::Client#delete_connector.", + "file": "vpc_access_service/delete_connector.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_connector", + "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client#delete_connector", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "VpcAccessService::Client", + "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client" + }, + "method": { + "short_name": "DeleteConnector", + "full_name": "google.cloud.vpcaccess.v1.VpcAccessService.DeleteConnector", + "service": { + "short_name": "VpcAccessService", + "full_name": "google.cloud.vpcaccess.v1.VpcAccessService" + } + } + }, + "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-vpc_access-v1/snippets/vpc_access_service/create_connector.rb b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/create_connector.rb new file mode 100644 index 000000000000..9d4b5a326409 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/create_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 vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync] +require "google/cloud/vpc_access/v1" + +## +# Snippet for the create_connector call in the VpcAccessService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VpcAccess::V1::VpcAccessService::Client#create_connector. +# +def create_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new + + # Call the create_connector method. + result = client.create_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 vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync] diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/delete_connector.rb b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/delete_connector.rb new file mode 100644 index 000000000000..7f7359c63908 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/delete_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 vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync] +require "google/cloud/vpc_access/v1" + +## +# Snippet for the delete_connector call in the VpcAccessService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VpcAccess::V1::VpcAccessService::Client#delete_connector. +# +def delete_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new + + # Call the delete_connector method. + result = client.delete_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 vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync] diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/get_connector.rb b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/get_connector.rb new file mode 100644 index 000000000000..6f68789450d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/get_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 vpcaccess_v1_generated_VpcAccessService_GetConnector_sync] +require "google/cloud/vpc_access/v1" + +## +# Snippet for the get_connector call in the VpcAccessService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VpcAccess::V1::VpcAccessService::Client#get_connector. +# +def get_connector + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::VpcAccess::V1::GetConnectorRequest.new + + # Call the get_connector method. + result = client.get_connector request + + # The returned object is of type Google::Cloud::VpcAccess::V1::Connector. + p result +end +# [END vpcaccess_v1_generated_VpcAccessService_GetConnector_sync] diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/list_connectors.rb b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/list_connectors.rb new file mode 100644 index 000000000000..0d7049d755ab --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/list_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 vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync] +require "google/cloud/vpc_access/v1" + +## +# Snippet for the list_connectors call in the VpcAccessService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::VpcAccess::V1::VpcAccessService::Client#list_connectors. +# +def list_connectors + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new + + # Call the list_connectors method. + result = client.list_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::VpcAccess::V1::Connector. + p item + end +end +# [END vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync] diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_operations_test.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_operations_test.rb new file mode 100644 index 000000000000..6f68f498f052 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_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/vpcaccess/v1/vpc_access_pb" +require "google/cloud/vpcaccess/v1/vpc_access_services_pb" +require "google/cloud/vpc_access/v1/vpc_access_service" + +class ::Google::Cloud::VpcAccess::V1::VpcAccessService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_paths_test.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_paths_test.rb new file mode 100644 index 000000000000..9ba18e2eb3d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_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/vpc_access/v1/vpc_access_service" + +class ::Google::Cloud::VpcAccess::V1::VpcAccessService::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_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::VpcAccess::V1::VpcAccessService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.connector_path project: "value0", location: "value1", connector: "value2" + assert_equal "projects/value0/locations/value1/connectors/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::VpcAccess::V1::VpcAccessService::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-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_rest_test.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_rest_test.rb new file mode 100644 index 000000000000..6b6f716024fe --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_rest_test.rb @@ -0,0 +1,319 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/vpcaccess/v1/vpc_access_pb" +require "google/cloud/vpc_access/v1/vpc_access_service/rest" + + +class ::Google::Cloud::VpcAccess::V1::VpcAccessService::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_connector + # Create test objects. + 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" + connector_id = "hello world" + connector = {} + + create_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.stub :transcode_create_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_connector_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_connector({ parent: parent, connector_id: connector_id, connector: connector }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_connector parent: parent, connector_id: connector_id, connector: connector do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_connector ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new(parent: parent, connector_id: connector_id, connector: connector) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_connector({ parent: parent, connector_id: connector_id, connector: connector }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_connector(::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new(parent: parent, connector_id: connector_id, connector: connector), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_connector_client_stub.call_count + end + end + end + + def test_get_connector + # Create test objects. + client_result = ::Google::Cloud::VpcAccess::V1::Connector.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.stub :transcode_get_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_connector_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_connector({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_connector name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_connector ::Google::Cloud::VpcAccess::V1::GetConnectorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_connector({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_connector(::Google::Cloud::VpcAccess::V1::GetConnectorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_connector_client_stub.call_count + end + end + end + + def test_list_connectors + # Create test objects. + client_result = ::Google::Cloud::VpcAccess::V1::ListConnectorsResponse.new + http_response = OpenStruct.new 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_connectors_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.stub :transcode_list_connectors_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_connectors_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_connectors({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_connectors parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_connectors ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_connectors({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_connectors(::Google::Cloud::VpcAccess::V1::ListConnectorsRequest.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_connectors_client_stub.call_count + end + end + end + + def test_delete_connector + # Create test objects. + 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_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.stub :transcode_delete_connector_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_connector_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_connector({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_connector name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_connector ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_connector({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_connector(::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_connector_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::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_test.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_test.rb new file mode 100644 index 000000000000..2c8083f3cb82 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_test.rb @@ -0,0 +1,373 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/vpcaccess/v1/vpc_access_pb" +require "google/cloud/vpc_access/v1/vpc_access_service" + +class ::Google::Cloud::VpcAccess::V1::VpcAccessService::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_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" + connector_id = "hello world" + connector = {} + + create_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_connector, name + assert_kind_of ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["connector_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VpcAccess::V1::Connector), request["connector"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_connector_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_connector({ parent: parent, connector_id: connector_id, connector: connector }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_connector parent: parent, connector_id: connector_id, connector: connector do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_connector ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new(parent: parent, connector_id: connector_id, connector: connector) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_connector({ parent: parent, connector_id: connector_id, connector: connector }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_connector(::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new(parent: parent, connector_id: connector_id, connector: connector), grpc_options) do |response, operation| + assert_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_connector_client_stub.call_rpc_count + end + end + + def test_get_connector + # Create GRPC objects. + grpc_response = ::Google::Cloud::VpcAccess::V1::Connector.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_connector, name + assert_kind_of ::Google::Cloud::VpcAccess::V1::GetConnectorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_connector_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_connector({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_connector name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_connector ::Google::Cloud::VpcAccess::V1::GetConnectorRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_connector({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_connector(::Google::Cloud::VpcAccess::V1::GetConnectorRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_connector_client_stub.call_rpc_count + end + end + + def test_list_connectors + # Create GRPC objects. + grpc_response = ::Google::Cloud::VpcAccess::V1::ListConnectorsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_connectors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_connectors, name + assert_kind_of ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest, 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_connectors_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_connectors({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_connectors parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_connectors ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_connectors({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_connectors(::Google::Cloud::VpcAccess::V1::ListConnectorsRequest.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_connectors_client_stub.call_rpc_count + end + end + + def test_delete_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" + + delete_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_connector, name + assert_kind_of ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_connector_client_stub do + # Create client + client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_connector({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_connector name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_connector ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_connector({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_connector(::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.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_connector_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::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/test/helper.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-vpc_access/.gitignore b/owl-bot-staging/google-cloud-vpc_access/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-vpc_access/.repo-metadata.json b/owl-bot-staging/google-cloud-vpc_access/.repo-metadata.json new file mode 100644 index 000000000000..10e171d05577 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "vpcaccess.googleapis.com", + "api_shortname": "vpcaccess", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access/latest", + "distribution_name": "google-cloud-vpc_access", + "is_cloud": true, + "language": "ruby", + "name": "vpcaccess", + "name_pretty": "Serverless VPC Access API", + "product_documentation": "https://cloud.google.com/vpc/docs/serverless-vpc-access", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address.", + "ruby-cloud-env-prefix": "VPC_ACCESS", + "ruby-cloud-product-url": "https://cloud.google.com/vpc/docs/serverless-vpc-access", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-vpc_access/.rubocop.yml b/owl-bot-staging/google-cloud-vpc_access/.rubocop.yml new file mode 100644 index 000000000000..098b6514bfd0 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-vpc_access.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-cloud-vpc_access.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-vpc_access/.toys.rb b/owl-bot-staging/google-cloud-vpc_access/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/.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-vpc_access/.yardopts b/owl-bot-staging/google-cloud-vpc_access/.yardopts new file mode 100644 index 000000000000..9b25ff10bc5e --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Serverless VPC Access API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-vpc_access/AUTHENTICATION.md b/owl-bot-staging/google-cloud-vpc_access/AUTHENTICATION.md new file mode 100644 index 000000000000..89d9c318560a --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-vpc_access 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-vpc_access 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/vpc_access" + +client = Google::Cloud::VpcAccess.vpc_access_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/vpc_access" + +Google::Cloud::VpcAccess.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::VpcAccess.vpc_access_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-vpc_access +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/vpc_access" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::VpcAccess.vpc_access_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-vpc_access/CHANGELOG.md b/owl-bot-staging/google-cloud-vpc_access/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-vpc_access/Gemfile b/owl-bot-staging/google-cloud-vpc_access/Gemfile new file mode 100644 index 000000000000..236435e43059 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-vpc_access-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-vpc_access.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-vpc_access/LICENSE.md b/owl-bot-staging/google-cloud-vpc_access/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/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-vpc_access/README.md b/owl-bot-staging/google-cloud-vpc_access/README.md new file mode 100644 index 000000000000..c0e54c7952f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Serverless VPC Access API + +API Client library for the Serverless VPC Access API + +Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-vpc_access-v*`. +The gem `google-cloud-vpc_access` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access/latest) +for this library, google-cloud-vpc_access, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-vpc_access-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/vpc/docs/serverless-vpc-access) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-vpc_access +``` + +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/vpcaccess.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/vpc_access" + +client = Google::Cloud::VpcAccess.vpc_access_service +request = ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new # (request fields as keyword arguments...) +response = client.create_connector request +``` + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-vpc_access-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-vpc_access`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-vpc_access-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-vpc_access`. +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-vpc_access-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-vpc_access/Rakefile b/owl-bot-staging/google-cloud-vpc_access/Rakefile new file mode 100644 index 000000000000..29c29a69e937 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-vpc_access acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["VPC_ACCESS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["VPC_ACCESS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["VPC_ACCESS_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 VPC_ACCESS_TEST_PROJECT=test123 VPC_ACCESS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/vpc_access/v1/vpc_access_service/credentials" + ::Google::Cloud::VpcAccess::V1::VpcAccessService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["VPC_ACCESS_PROJECT"] = project + ENV["VPC_ACCESS_TEST_PROJECT"] = project + ENV["VPC_ACCESS_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-vpc_access 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-vpc_access 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-vpc_access 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-vpc_access gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-vpc_access" + header "google-cloud-vpc_access rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-vpc_access yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-vpc_access 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-vpc_access 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-vpc_access 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-vpc_access/google-cloud-vpc_access.gemspec b/owl-bot-staging/google-cloud-vpc_access/google-cloud-vpc_access.gemspec new file mode 100644 index 000000000000..90a578eb3f09 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/google-cloud-vpc_access.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/vpc_access/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-vpc_access" + gem.version = Google::Cloud::VpcAccess::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address." + gem.summary = "API Client library for the Serverless VPC Access API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-vpc_access-v1", ">= 0.7", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-vpc_access/lib/google-cloud-vpc_access.rb b/owl-bot-staging/google-cloud-vpc_access/lib/google-cloud-vpc_access.rb new file mode 100644 index 000000000000..744a62659de5 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/lib/google-cloud-vpc_access.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/vpc_access" unless defined? Google::Cloud::VpcAccess::VERSION diff --git a/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access.rb b/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access.rb new file mode 100644 index 000000000000..4f089d02bbc4 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/vpc_access/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :vpc_access do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module VpcAccess + ## + # Create a new client object for VpcAccessService. + # + # By default, this returns an instance of + # [Google::Cloud::VpcAccess::V1::VpcAccessService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest/Google-Cloud-VpcAccess-V1-VpcAccessService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the VpcAccessService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the VpcAccessService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::VpcAccess.vpc_access_service_available?}. + # + # ## About VpcAccessService + # + # Serverless VPC Access API allows users to create and manage connectors for + # App Engine, Cloud Functions and Cloud Run to have internal connections to + # Virtual Private Cloud networks. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.vpc_access_service version: :v1, transport: :grpc, &block + require "google/cloud/vpc_access/#{version.to_s.downcase}" + + package_name = Google::Cloud::VpcAccess + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::VpcAccess.const_get(package_name).const_get(:VpcAccessService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the VpcAccessService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::VpcAccess.vpc_access_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the VpcAccessService service, + # or if the versioned client gem needs an update to support the VpcAccessService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.vpc_access_service_available? version: :v1, transport: :grpc + require "google/cloud/vpc_access/#{version.to_s.downcase}" + package_name = Google::Cloud::VpcAccess + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::VpcAccess.const_get package_name + return false unless service_module.const_defined? :VpcAccessService + service_module = service_module.const_get :VpcAccessService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-vpc_access library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.vpc_access if block_given? + + ::Google::Cloud.configure.vpc_access + end + end + end +end + +helper_path = ::File.join __dir__, "vpc_access", "helpers.rb" +require "google/cloud/vpc_access/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access/version.rb b/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access/version.rb new file mode 100644 index 000000000000..a1e9745fde8c --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module VpcAccess + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/client_test.rb b/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/client_test.rb new file mode 100644 index 000000000000..997403d2c783 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/vpc_access" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::VpcAccess::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_vpc_access_service_grpc + skip unless Google::Cloud::VpcAccess.vpc_access_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::VpcAccess.vpc_access_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::VpcAccess::V1::VpcAccessService::Client, client + end + end + + def test_vpc_access_service_rest + skip unless Google::Cloud::VpcAccess.vpc_access_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::VpcAccess.vpc_access_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/version_test.rb b/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/version_test.rb new file mode 100644 index 000000000000..8e71efe37767 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/vpc_access/version" + +class Google::Cloud::VpcAccess::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::VpcAccess::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-vpc_access/test/helper.rb b/owl-bot-staging/google-cloud-vpc_access/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-vpc_access/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_risk-v1/.gitignore b/owl-bot-staging/google-cloud-web_risk-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-web_risk-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-web_risk-v1/.repo-metadata.json new file mode 100644 index 000000000000..643cdaf4e9c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "webrisk.googleapis.com", + "api_shortname": "webrisk", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest", + "distribution_name": "google-cloud-web_risk-v1", + "is_cloud": true, + "language": "ruby", + "name": "webrisk", + "name_pretty": "Web Risk V1 API", + "product_documentation": "https://cloud.google.com/web-risk", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. Note that google-cloud-web_risk-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_risk instead. See the readme for more details.", + "ruby-cloud-env-prefix": "WEBRISK", + "ruby-cloud-product-url": "https://cloud.google.com/web-risk", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-web_risk-v1/.rubocop.yml b/owl-bot-staging/google-cloud-web_risk-v1/.rubocop.yml new file mode 100644 index 000000000000..8f9201883964 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-web_risk-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-web_risk-v1.rb" diff --git a/owl-bot-staging/google-cloud-web_risk-v1/.toys.rb b/owl-bot-staging/google-cloud-web_risk-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/.yardopts b/owl-bot-staging/google-cloud-web_risk-v1/.yardopts new file mode 100644 index 000000000000..ec02341dae2a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Web Risk 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-web_risk-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_risk-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..5cc149dffad2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-web_risk-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-web_risk-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/web_risk/v1" + +client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/web_risk/v1" + +::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::WebRisk::V1::WebRiskService::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-web_risk-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/web_risk/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::WebRisk::V1::WebRiskService::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-web_risk-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-web_risk-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-web_risk-v1/Gemfile b/owl-bot-staging/google-cloud-web_risk-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_risk-v1/LICENSE.md b/owl-bot-staging/google-cloud-web_risk-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/README.md b/owl-bot-staging/google-cloud-web_risk-v1/README.md new file mode 100644 index 000000000000..b372abe1f580 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Web Risk V1 API + +API Client library for the Web Risk V1 API + +Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Web Risk V1 API. Most users should consider using +the main client gem, +[google-cloud-web_risk](https://rubygems.org/gems/google-cloud-web_risk). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-web_risk-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/webrisk.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/web_risk/v1" + +client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new +request = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new # (request fields as keyword arguments...) +response = client.compute_threat_list_diff request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/web-risk) +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/web_risk/v1" +require "logger" + +client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-web_risk`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-web_risk-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-web_risk`. +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-web_risk-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-web_risk-v1/Rakefile b/owl-bot-staging/google-cloud-web_risk-v1/Rakefile new file mode 100644 index 000000000000..1b6fd789ed60 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WEBRISK_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WEBRISK_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WEBRISK_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 WEBRISK_TEST_PROJECT=test123 WEBRISK_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/web_risk/v1/web_risk_service/credentials" + ::Google::Cloud::WebRisk::V1::WebRiskService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WEBRISK_PROJECT"] = project + ENV["WEBRISK_TEST_PROJECT"] = project + ENV["WEBRISK_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-web_risk-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-web_risk-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-web_risk-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-web_risk-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-web_risk-v1" + header "google-cloud-web_risk-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-web_risk-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-web_risk-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-web_risk-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-web_risk-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-web_risk-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-web_risk-v1/gapic_metadata.json new file mode 100644 index 000000000000..2a721b8d290c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/gapic_metadata.json @@ -0,0 +1,43 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.webrisk.v1", + "libraryPackage": "::Google::Cloud::WebRisk::V1", + "services": { + "WebRiskService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::WebRisk::V1::WebRiskService::Client", + "rpcs": { + "ComputeThreatListDiff": { + "methods": [ + "compute_threat_list_diff" + ] + }, + "SearchUris": { + "methods": [ + "search_uris" + ] + }, + "SearchHashes": { + "methods": [ + "search_hashes" + ] + }, + "CreateSubmission": { + "methods": [ + "create_submission" + ] + }, + "SubmitUri": { + "methods": [ + "submit_uri" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-web_risk-v1/google-cloud-web_risk-v1.gemspec b/owl-bot-staging/google-cloud-web_risk-v1/google-cloud-web_risk-v1.gemspec new file mode 100644 index 000000000000..906c2d6daa93 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/google-cloud-web_risk-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/web_risk/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-web_risk-v1" + gem.version = Google::Cloud::WebRisk::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. Note that google-cloud-web_risk-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_risk instead. See the readme for more details." + gem.summary = "API Client library for the Web Risk V1 API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google-cloud-web_risk-v1.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google-cloud-web_risk-v1.rb new file mode 100644 index 000000000000..e475a4250097 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google-cloud-web_risk-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/web_risk/v1" diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1.rb new file mode 100644 index 000000000000..ad12e150fde4 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/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/web_risk/v1/web_risk_service" +require "google/cloud/web_risk/v1/version" + +module Google + module Cloud + module WebRisk + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/web_risk/v1" + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/web_risk/v1" + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/web_risk/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/rest.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/rest.rb new file mode 100644 index 000000000000..5b0f7ea9f037 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/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/web_risk/v1/web_risk_service/rest" +require "google/cloud/web_risk/v1/version" + +module Google + module Cloud + module WebRisk + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/web_risk/v1/rest" + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/version.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/version.rb new file mode 100644 index 000000000000..0cb886f79570 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/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 WebRisk + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service.rb new file mode 100644 index 000000000000..02e972cd1c09 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_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/web_risk/v1/version" + +require "google/cloud/web_risk/v1/web_risk_service/credentials" +require "google/cloud/web_risk/v1/web_risk_service/paths" +require "google/cloud/web_risk/v1/web_risk_service/operations" +require "google/cloud/web_risk/v1/web_risk_service/client" +require "google/cloud/web_risk/v1/web_risk_service/rest" + +module Google + module Cloud + module WebRisk + module V1 + ## + # Web Risk API defines an interface to detect malicious URLs on your + # website and in client applications. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/web_risk/v1/web_risk_service" + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/web_risk/v1/web_risk_service/rest" + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + module WebRiskService + end + end + end + end +end + +helper_path = ::File.join __dir__, "web_risk_service", "helpers.rb" +require "google/cloud/web_risk/v1/web_risk_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/client.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/client.rb new file mode 100644 index 000000000000..b0f4624a8848 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/client.rb @@ -0,0 +1,916 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/webrisk/v1/webrisk_pb" + +module Google + module Cloud + module WebRisk + module V1 + module WebRiskService + ## + # Client for the WebRiskService service. + # + # Web Risk API defines an interface to detect malicious URLs on your + # website and in client applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :web_risk_service_stub + + ## + # Configure the WebRiskService Client class. + # + # See {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WebRiskService clients + # ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "WebRisk", "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.compute_threat_list_diff.timeout = 600.0 + default_config.rpcs.compute_threat_list_diff.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_uris.timeout = 600.0 + default_config.rpcs.search_uris.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_hashes.timeout = 600.0 + default_config.rpcs.search_hashes.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_submission.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the WebRiskService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @web_risk_service_stub.universe_domain + end + + ## + # Create a new WebRiskService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WebRiskService 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/webrisk/v1/webrisk_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 + + @web_risk_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::WebRisk::V1::WebRiskService::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 + ) + + @web_risk_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::WebRisk::V1::WebRiskService::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @web_risk_service_stub.logger + end + + # Service calls + + ## + # Gets the most recent threat list diffs. These diffs should be applied to + # a local database of hashes to keep it up-to-date. If the local database is + # empty or excessively out-of-date, a complete snapshot of the database will + # be returned. This Method only updates a single ThreatList at a time. To + # update multiple ThreatList databases, this method needs to be called once + # for each list. + # + # @overload compute_threat_list_diff(request, options = nil) + # Pass arguments to `compute_threat_list_diff` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil) + # Pass arguments to `compute_threat_list_diff` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param threat_type [::Google::Cloud::WebRisk::V1::ThreatType] + # Required. The threat list to update. Only a single ThreatType should be + # specified per request. If you want to handle multiple ThreatTypes, you must + # make one request per ThreatType. + # @param version_token [::String] + # The current version token of the client for the requested list (the + # client version that was received from the last successful diff). + # If the client does not have a version token (this is the first time calling + # ComputeThreatListDiff), this may be left empty and a full database + # snapshot will be returned. + # @param constraints [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints, ::Hash] + # Required. The constraints associated with this request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new + # + # # Call the compute_threat_list_diff method. + # result = client.compute_threat_list_diff request + # + # # The returned object is of type Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse. + # p result + # + def compute_threat_list_diff request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::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.compute_threat_list_diff.timeout, + metadata: metadata, + retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.call_rpc :compute_threat_list_diff, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # This method is used to check whether a URI is on a given threatList. + # Multiple threatLists may be searched in a single query. + # The response will list all requested threatLists the URI was found to + # match. If the URI is not found on any of the requested ThreatList an + # empty response will be returned. + # + # @overload search_uris(request, options = nil) + # Pass arguments to `search_uris` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::SearchUrisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::SearchUrisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_uris(uri: nil, threat_types: nil) + # Pass arguments to `search_uris` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param uri [::String] + # Required. The URI to be checked for matches. + # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] + # Required. The ThreatLists to search in. Multiple ThreatLists may be + # specified. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebRisk::V1::SearchUrisResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::SearchUrisRequest.new + # + # # Call the search_uris method. + # result = client.search_uris request + # + # # The returned object is of type Google::Cloud::WebRisk::V1::SearchUrisResponse. + # p result + # + def search_uris request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchUrisRequest + + # Converts hash and nil to 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_uris.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::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.search_uris.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_uris.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.call_rpc :search_uris, request, 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 full hashes that match the requested hash prefix. + # This is used after a hash prefix is looked up in a threatList + # and there is a match. The client side threatList only holds partial hashes + # so the client must query this method to determine if there is a full + # hash match of a threat. + # + # @overload search_hashes(request, options = nil) + # Pass arguments to `search_hashes` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::SearchHashesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::SearchHashesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hashes(hash_prefix: nil, threat_types: nil) + # Pass arguments to `search_hashes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param hash_prefix [::String] + # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + # hash. For JSON requests, this field is base64-encoded. + # Note that if this parameter is provided by a URI, it must be encoded using + # the web safe base64 variant (RFC 4648). + # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] + # Required. The ThreatLists to search in. Multiple ThreatLists may be + # specified. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebRisk::V1::SearchHashesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebRisk::V1::SearchHashesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::SearchHashesRequest.new + # + # # Call the search_hashes method. + # result = client.search_hashes request + # + # # The returned object is of type Google::Cloud::WebRisk::V1::SearchHashesResponse. + # p result + # + def search_hashes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchHashesRequest + + # Converts hash and nil to 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_hashes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::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.search_hashes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_hashes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.call_rpc :search_hashes, request, 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 Submission of a URI suspected of containing phishing content to + # be reviewed. If the result verifies the existence of malicious phishing + # content, the site will be added to the [Google's Social Engineering + # lists](https://support.google.com/webmasters/answer/6350487/) in order to + # protect users that could get exposed to this threat in the future. Only + # allowlisted projects can use this method during Early Access. Please reach + # out to Sales or your customer engineer to obtain access. + # + # @overload create_submission(request, options = nil) + # Pass arguments to `create_submission` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::CreateSubmissionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_submission(parent: nil, submission: nil) + # Pass arguments to `create_submission` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that is making the submission. This + # string is in the format "projects/\\{project_number}". + # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash] + # Required. The submission that contains the content of the phishing report. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebRisk::V1::Submission] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebRisk::V1::Submission] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new + # + # # Call the create_submission method. + # result = client.create_submission request + # + # # The returned object is of type Google::Cloud::WebRisk::V1::Submission. + # p result + # + def create_submission request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_submission.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_submission.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_submission.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.call_rpc :create_submission, request, 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 URI suspected of containing malicious content to be reviewed. + # Returns a google.longrunning.Operation which, once the review is complete, + # is updated with its result. You can use the [Pub/Sub API] + # (https://cloud.google.com/pubsub) to receive notifications for the returned + # Operation. If the result verifies the existence of malicious content, the + # site will be added to the [Google's Social Engineering lists] + # (https://support.google.com/webmasters/answer/6350487/) in order to + # protect users that could get exposed to this threat in the future. Only + # allowlisted projects can use this method during Early Access. Please reach + # out to Sales or your customer engineer to obtain access. + # + # @overload submit_uri(request, options = nil) + # Pass arguments to `submit_uri` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::SubmitUriRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::SubmitUriRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_uri(parent: nil, submission: nil, threat_info: nil, threat_discovery: nil) + # Pass arguments to `submit_uri` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that is making the submission. This + # string is in the format "projects/\\{project_number}". + # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash] + # Required. The submission that contains the URI to be scanned. + # @param threat_info [::Google::Cloud::WebRisk::V1::ThreatInfo, ::Hash] + # Provides additional information about the submission. + # @param threat_discovery [::Google::Cloud::WebRisk::V1::ThreatDiscovery, ::Hash] + # Provides additional information about how the submission was discovered. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::SubmitUriRequest.new + # + # # Call the submit_uri method. + # result = client.submit_uri request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def submit_uri request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SubmitUriRequest + + # Converts hash and nil to 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_uri.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_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_uri.timeout, + metadata: metadata, + retry_policy: @config.rpcs.submit_uri.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.call_rpc :submit_uri, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 WebRiskService API. + # + # This class represents the configuration for WebRiskService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # compute_threat_list_diff to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.compute_threat_list_diff.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.compute_threat_list_diff.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::WebRisk::V1::WebRiskService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "webrisk.googleapis.com" + + config_attr :endpoint, nil, ::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 WebRiskService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `compute_threat_list_diff` + # @return [::Gapic::Config::Method] + # + attr_reader :compute_threat_list_diff + ## + # RPC-specific configuration for `search_uris` + # @return [::Gapic::Config::Method] + # + attr_reader :search_uris + ## + # RPC-specific configuration for `search_hashes` + # @return [::Gapic::Config::Method] + # + attr_reader :search_hashes + ## + # RPC-specific configuration for `create_submission` + # @return [::Gapic::Config::Method] + # + attr_reader :create_submission + ## + # RPC-specific configuration for `submit_uri` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_uri + + # @private + def initialize parent_rpcs = nil + compute_threat_list_diff_config = parent_rpcs.compute_threat_list_diff if parent_rpcs.respond_to? :compute_threat_list_diff + @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config + search_uris_config = parent_rpcs.search_uris if parent_rpcs.respond_to? :search_uris + @search_uris = ::Gapic::Config::Method.new search_uris_config + search_hashes_config = parent_rpcs.search_hashes if parent_rpcs.respond_to? :search_hashes + @search_hashes = ::Gapic::Config::Method.new search_hashes_config + create_submission_config = parent_rpcs.create_submission if parent_rpcs.respond_to? :create_submission + @create_submission = ::Gapic::Config::Method.new create_submission_config + submit_uri_config = parent_rpcs.submit_uri if parent_rpcs.respond_to? :submit_uri + @submit_uri = ::Gapic::Config::Method.new submit_uri_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/credentials.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/credentials.rb new file mode 100644 index 000000000000..dbc56f07610b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_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 WebRisk + module V1 + module WebRiskService + # Credentials for the WebRiskService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "WEBRISK_CREDENTIALS", + "WEBRISK_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "WEBRISK_CREDENTIALS_JSON", + "WEBRISK_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-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/operations.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/operations.rb new file mode 100644 index 000000000000..0c9945f420ed --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module WebRisk + module V1 + module WebRiskService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the WebRiskService 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 WebRiskService 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::WebRisk::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::WebRisk::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::WebRisk::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::WebRisk::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::WebRisk::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "webrisk.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/paths.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/paths.rb new file mode 100644 index 000000000000..b788c51e20cd --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/paths.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebRisk + module V1 + module WebRiskService + # Path helper methods for the WebRiskService API. + module Paths + ## + # Create a fully-qualified Project resource string. + # + # The resource will be in the following format: + # + # `projects/{project}` + # + # @param project [String] + # + # @return [::String] + def project_path project: + "projects/#{project}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest.rb new file mode 100644 index 000000000000..0c1cf72ecccb --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_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/web_risk/v1/version" + +require "google/cloud/web_risk/v1/web_risk_service/credentials" +require "google/cloud/web_risk/v1/web_risk_service/paths" +require "google/cloud/web_risk/v1/web_risk_service/rest/operations" +require "google/cloud/web_risk/v1/web_risk_service/rest/client" + +module Google + module Cloud + module WebRisk + module V1 + ## + # Web Risk API defines an interface to detect malicious URLs on your + # website and in client applications. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/web_risk/v1/web_risk_service/rest" + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + module WebRiskService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/web_risk/v1/web_risk_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/client.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/client.rb new file mode 100644 index 000000000000..ee5ae8088b9d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/client.rb @@ -0,0 +1,862 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/webrisk/v1/webrisk_pb" +require "google/cloud/web_risk/v1/web_risk_service/rest/service_stub" + +module Google + module Cloud + module WebRisk + module V1 + module WebRiskService + module Rest + ## + # REST client for the WebRiskService service. + # + # Web Risk API defines an interface to detect malicious URLs on your + # website and in client applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :web_risk_service_stub + + ## + # Configure the WebRiskService Client class. + # + # See {::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WebRiskService clients + # ::Google::Cloud::WebRisk::V1::WebRiskService::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", "WebRisk", "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.compute_threat_list_diff.timeout = 600.0 + default_config.rpcs.compute_threat_list_diff.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_uris.timeout = 600.0 + default_config.rpcs.search_uris.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_hashes.timeout = 600.0 + default_config.rpcs.search_hashes.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.create_submission.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the WebRiskService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WebRisk::V1::WebRiskService::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 + @web_risk_service_stub.universe_domain + end + + ## + # Create a new WebRiskService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WebRiskService 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::WebRisk::V1::WebRiskService::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 + + @web_risk_service_stub = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @web_risk_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::WebRisk::V1::WebRiskService::Rest::Operations] + # + attr_reader :operations_client + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @web_risk_service_stub.logger + end + + # Service calls + + ## + # Gets the most recent threat list diffs. These diffs should be applied to + # a local database of hashes to keep it up-to-date. If the local database is + # empty or excessively out-of-date, a complete snapshot of the database will + # be returned. This Method only updates a single ThreatList at a time. To + # update multiple ThreatList databases, this method needs to be called once + # for each list. + # + # @overload compute_threat_list_diff(request, options = nil) + # Pass arguments to `compute_threat_list_diff` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil) + # Pass arguments to `compute_threat_list_diff` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param threat_type [::Google::Cloud::WebRisk::V1::ThreatType] + # Required. The threat list to update. Only a single ThreatType should be + # specified per request. If you want to handle multiple ThreatTypes, you must + # make one request per ThreatType. + # @param version_token [::String] + # The current version token of the client for the requested list (the + # client version that was received from the last successful diff). + # If the client does not have a version token (this is the first time calling + # ComputeThreatListDiff), this may be left empty and a full database + # snapshot will be returned. + # @param constraints [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints, ::Hash] + # Required. The constraints associated with this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new + # + # # Call the compute_threat_list_diff method. + # result = client.compute_threat_list_diff request + # + # # The returned object is of type Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse. + # p result + # + def compute_threat_list_diff request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.compute_threat_list_diff.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.compute_threat_list_diff request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # This method is used to check whether a URI is on a given threatList. + # Multiple threatLists may be searched in a single query. + # The response will list all requested threatLists the URI was found to + # match. If the URI is not found on any of the requested ThreatList an + # empty response will be returned. + # + # @overload search_uris(request, options = nil) + # Pass arguments to `search_uris` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::SearchUrisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::SearchUrisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_uris(uri: nil, threat_types: nil) + # Pass arguments to `search_uris` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param uri [::String] + # Required. The URI to be checked for matches. + # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] + # Required. The ThreatLists to search in. Multiple ThreatLists may be + # specified. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchUrisResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::SearchUrisRequest.new + # + # # Call the search_uris method. + # result = client.search_uris request + # + # # The returned object is of type Google::Cloud::WebRisk::V1::SearchUrisResponse. + # p result + # + def search_uris request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchUrisRequest + + # Converts hash and nil to an 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_uris.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_uris.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_uris.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.search_uris request, 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 full hashes that match the requested hash prefix. + # This is used after a hash prefix is looked up in a threatList + # and there is a match. The client side threatList only holds partial hashes + # so the client must query this method to determine if there is a full + # hash match of a threat. + # + # @overload search_hashes(request, options = nil) + # Pass arguments to `search_hashes` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::SearchHashesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::SearchHashesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hashes(hash_prefix: nil, threat_types: nil) + # Pass arguments to `search_hashes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param hash_prefix [::String] + # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + # hash. For JSON requests, this field is base64-encoded. + # Note that if this parameter is provided by a URI, it must be encoded using + # the web safe base64 variant (RFC 4648). + # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] + # Required. The ThreatLists to search in. Multiple ThreatLists may be + # specified. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchHashesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1::SearchHashesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::SearchHashesRequest.new + # + # # Call the search_hashes method. + # result = client.search_hashes request + # + # # The returned object is of type Google::Cloud::WebRisk::V1::SearchHashesResponse. + # p result + # + def search_hashes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchHashesRequest + + # Converts hash and nil to an 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_hashes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hashes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_hashes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.search_hashes request, 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 Submission of a URI suspected of containing phishing content to + # be reviewed. If the result verifies the existence of malicious phishing + # content, the site will be added to the [Google's Social Engineering + # lists](https://support.google.com/webmasters/answer/6350487/) in order to + # protect users that could get exposed to this threat in the future. Only + # allowlisted projects can use this method during Early Access. Please reach + # out to Sales or your customer engineer to obtain access. + # + # @overload create_submission(request, options = nil) + # Pass arguments to `create_submission` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::CreateSubmissionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_submission(parent: nil, submission: nil) + # Pass arguments to `create_submission` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that is making the submission. This + # string is in the format "projects/\\{project_number}". + # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash] + # Required. The submission that contains the content of the phishing report. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1::Submission] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1::Submission] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new + # + # # Call the create_submission method. + # result = client.create_submission request + # + # # The returned object is of type Google::Cloud::WebRisk::V1::Submission. + # p result + # + def create_submission request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest + + # Converts hash and nil to an 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_submission.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_submission.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_submission.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.create_submission request, 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 URI suspected of containing malicious content to be reviewed. + # Returns a google.longrunning.Operation which, once the review is complete, + # is updated with its result. You can use the [Pub/Sub API] + # (https://cloud.google.com/pubsub) to receive notifications for the returned + # Operation. If the result verifies the existence of malicious content, the + # site will be added to the [Google's Social Engineering lists] + # (https://support.google.com/webmasters/answer/6350487/) in order to + # protect users that could get exposed to this threat in the future. Only + # allowlisted projects can use this method during Early Access. Please reach + # out to Sales or your customer engineer to obtain access. + # + # @overload submit_uri(request, options = nil) + # Pass arguments to `submit_uri` via a request object, either of type + # {::Google::Cloud::WebRisk::V1::SubmitUriRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1::SubmitUriRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_uri(parent: nil, submission: nil, threat_info: nil, threat_discovery: nil) + # Pass arguments to `submit_uri` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that is making the submission. This + # string is in the format "projects/\\{project_number}". + # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash] + # Required. The submission that contains the URI to be scanned. + # @param threat_info [::Google::Cloud::WebRisk::V1::ThreatInfo, ::Hash] + # Provides additional information about the submission. + # @param threat_discovery [::Google::Cloud::WebRisk::V1::ThreatDiscovery, ::Hash] + # Provides additional information about how the submission was discovered. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1::SubmitUriRequest.new + # + # # Call the submit_uri method. + # result = client.submit_uri request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def submit_uri request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SubmitUriRequest + + # Converts hash and nil to an 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_uri.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_uri.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.submit_uri.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.submit_uri request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 WebRiskService REST API. + # + # This class represents the configuration for WebRiskService 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::WebRisk::V1::WebRiskService::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 + # # compute_threat_list_diff to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.compute_threat_list_diff.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.compute_threat_list_diff.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "webrisk.googleapis.com" + + config_attr :endpoint, nil, ::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 WebRiskService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `compute_threat_list_diff` + # @return [::Gapic::Config::Method] + # + attr_reader :compute_threat_list_diff + ## + # RPC-specific configuration for `search_uris` + # @return [::Gapic::Config::Method] + # + attr_reader :search_uris + ## + # RPC-specific configuration for `search_hashes` + # @return [::Gapic::Config::Method] + # + attr_reader :search_hashes + ## + # RPC-specific configuration for `create_submission` + # @return [::Gapic::Config::Method] + # + attr_reader :create_submission + ## + # RPC-specific configuration for `submit_uri` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_uri + + # @private + def initialize parent_rpcs = nil + compute_threat_list_diff_config = parent_rpcs.compute_threat_list_diff if parent_rpcs.respond_to? :compute_threat_list_diff + @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config + search_uris_config = parent_rpcs.search_uris if parent_rpcs.respond_to? :search_uris + @search_uris = ::Gapic::Config::Method.new search_uris_config + search_hashes_config = parent_rpcs.search_hashes if parent_rpcs.respond_to? :search_hashes + @search_hashes = ::Gapic::Config::Method.new search_hashes_config + create_submission_config = parent_rpcs.create_submission if parent_rpcs.respond_to? :create_submission + @create_submission = ::Gapic::Config::Method.new create_submission_config + submit_uri_config = parent_rpcs.submit_uri if parent_rpcs.respond_to? :submit_uri + @submit_uri = ::Gapic::Config::Method.new submit_uri_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/operations.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/operations.rb new file mode 100644 index 000000000000..1c9a2c9901a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module WebRisk + module V1 + module WebRiskService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the WebRiskService 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 WebRiskService 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::WebRisk::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::WebRisk::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::WebRisk::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::WebRisk::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "webrisk.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, 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/[^/]+/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/[^/]+/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/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/service_stub.rb new file mode 100644 index 000000000000..f1c555943374 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/service_stub.rb @@ -0,0 +1,382 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/webrisk/v1/webrisk_pb" + +module Google + module Cloud + module WebRisk + module V1 + module WebRiskService + module Rest + ## + # REST service stub for the WebRiskService 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 compute_threat_list_diff REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] + # A result object deserialized from the server's reply + def compute_threat_list_diff request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_compute_threat_list_diff_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "compute_threat_list_diff", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse.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_uris REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::SearchUrisRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchUrisResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse] + # A result object deserialized from the server's reply + def search_uris request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_uris_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_uris", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebRisk::V1::SearchUrisResponse.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_hashes REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::SearchHashesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchHashesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1::SearchHashesResponse] + # A result object deserialized from the server's reply + def search_hashes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_hashes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hashes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebRisk::V1::SearchHashesResponse.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_submission REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1::Submission] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1::Submission] + # A result object deserialized from the server's reply + def create_submission request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_submission_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_submission", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebRisk::V1::Submission.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_uri REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::SubmitUriRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def submit_uri request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_submit_uri_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_uri", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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 compute_threat_list_diff REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_compute_threat_list_diff_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/threatLists:computeDiff", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_uris REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::SearchUrisRequest] + # 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_uris_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/uris:search", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_hashes REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::SearchHashesRequest] + # 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_hashes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/hashes:search", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_submission REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest] + # 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_submission_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/submissions", + body: "submission", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the submit_uri REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1::SubmitUriRequest] + # 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_uri_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/uris:submit", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_pb.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_pb.rb new file mode 100644 index 000000000000..55280fad2c55 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_pb.rb @@ -0,0 +1,80 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/webrisk/v1/webrisk.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/webrisk/v1/webrisk.proto\x12\x17google.cloud.webrisk.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\"\xe3\x02\n\x1c\x43omputeThreatListDiffRequest\x12=\n\x0bthreat_type\x18\x01 \x01(\x0e\x32#.google.cloud.webrisk.v1.ThreatTypeB\x03\xe0\x41\x02\x12\x15\n\rversion_token\x18\x02 \x01(\x0c\x12[\n\x0b\x63onstraints\x18\x03 \x01(\x0b\x32\x41.google.cloud.webrisk.v1.ComputeThreatListDiffRequest.ConstraintsB\x03\xe0\x41\x02\x1a\x8f\x01\n\x0b\x43onstraints\x12\x18\n\x10max_diff_entries\x18\x01 \x01(\x05\x12\x1c\n\x14max_database_entries\x18\x02 \x01(\x05\x12H\n\x16supported_compressions\x18\x03 \x03(\x0e\x32(.google.cloud.webrisk.v1.CompressionType\"\x86\x04\n\x1d\x43omputeThreatListDiffResponse\x12Z\n\rresponse_type\x18\x04 \x01(\x0e\x32\x43.google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType\x12@\n\tadditions\x18\x05 \x01(\x0b\x32-.google.cloud.webrisk.v1.ThreatEntryAdditions\x12>\n\x08removals\x18\x06 \x01(\x0b\x32,.google.cloud.webrisk.v1.ThreatEntryRemovals\x12\x19\n\x11new_version_token\x18\x07 \x01(\x0c\x12Q\n\x08\x63hecksum\x18\x08 \x01(\x0b\x32?.google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum\x12\x39\n\x15recommended_next_diff\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1a\n\x08\x43hecksum\x12\x0e\n\x06sha256\x18\x01 \x01(\x0c\"B\n\x0cResponseType\x12\x1d\n\x19RESPONSE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44IFF\x10\x01\x12\t\n\x05RESET\x10\x02\"e\n\x11SearchUrisRequest\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0cthreat_types\x18\x02 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatTypeB\x03\xe0\x41\x02\"\xd4\x01\n\x12SearchUrisResponse\x12\x45\n\x06threat\x18\x01 \x01(\x0b\x32\x35.google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri\x1aw\n\tThreatUri\x12\x39\n\x0cthreat_types\x18\x01 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatType\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"j\n\x13SearchHashesRequest\x12\x13\n\x0bhash_prefix\x18\x01 \x01(\x0c\x12>\n\x0cthreat_types\x18\x02 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatTypeB\x03\xe0\x41\x02\"\xa4\x02\n\x14SearchHashesResponse\x12I\n\x07threats\x18\x01 \x03(\x0b\x32\x38.google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash\x12\x38\n\x14negative_expire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x86\x01\n\nThreatHash\x12\x39\n\x0cthreat_types\x18\x01 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatType\x12\x0c\n\x04hash\x18\x02 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8f\x01\n\x14ThreatEntryAdditions\x12\x36\n\nraw_hashes\x18\x01 \x03(\x0b\x32\".google.cloud.webrisk.v1.RawHashes\x12?\n\x0brice_hashes\x18\x02 \x01(\x0b\x32*.google.cloud.webrisk.v1.RiceDeltaEncoding\"\x91\x01\n\x13ThreatEntryRemovals\x12\x38\n\x0braw_indices\x18\x01 \x01(\x0b\x32#.google.cloud.webrisk.v1.RawIndices\x12@\n\x0crice_indices\x18\x02 \x01(\x0b\x32*.google.cloud.webrisk.v1.RiceDeltaEncoding\"\x1d\n\nRawIndices\x12\x0f\n\x07indices\x18\x01 \x03(\x05\"4\n\tRawHashes\x12\x13\n\x0bprefix_size\x18\x01 \x01(\x05\x12\x12\n\nraw_hashes\x18\x02 \x01(\x0c\"k\n\x11RiceDeltaEncoding\x12\x13\n\x0b\x66irst_value\x18\x01 \x01(\x03\x12\x16\n\x0erice_parameter\x18\x02 \x01(\x05\x12\x13\n\x0b\x65ntry_count\x18\x03 \x01(\x05\x12\x14\n\x0c\x65ncoded_data\x18\x04 \x01(\x0c\"^\n\nSubmission\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0cthreat_types\x18\x02 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatTypeB\x03\xe0\x41\x03\"\xa5\x06\n\nThreatInfo\x12\x41\n\nabuse_type\x18\x01 \x01(\x0e\x32-.google.cloud.webrisk.v1.ThreatInfo.AbuseType\x12I\n\x11threat_confidence\x18\x02 \x01(\x0b\x32..google.cloud.webrisk.v1.ThreatInfo.Confidence\x12U\n\x14threat_justification\x18\x03 \x01(\x0b\x32\x37.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification\x1a\xcb\x01\n\nConfidence\x12\x0f\n\x05score\x18\x01 \x01(\x02H\x00\x12O\n\x05level\x18\x02 \x01(\x0e\x32>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevelH\x00\"R\n\x0f\x43onfidenceLevel\x12 \n\x1c\x43ONFIDENCE_LEVEL_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x07\n\x05value\x1a\xfe\x01\n\x13ThreatJustification\x12Z\n\x06labels\x18\x01 \x03(\x0e\x32J.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel\x12\x10\n\x08\x63omments\x18\x02 \x03(\t\"y\n\x12JustificationLabel\x12#\n\x1fJUSTIFICATION_LABEL_UNSPECIFIED\x10\x00\x12\x17\n\x13MANUAL_VERIFICATION\x10\x01\x12\x0f\n\x0bUSER_REPORT\x10\x02\x12\x14\n\x10\x41UTOMATED_REPORT\x10\x03\"c\n\tAbuseType\x12\x1a\n\x16\x41\x42USE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MALWARE\x10\x01\x12\x16\n\x12SOCIAL_ENGINEERING\x10\x02\x12\x15\n\x11UNWANTED_SOFTWARE\x10\x03\"\xc0\x01\n\x0fThreatDiscovery\x12\x43\n\x08platform\x18\x01 \x01(\x0e\x32\x31.google.cloud.webrisk.v1.ThreatDiscovery.Platform\x12\x14\n\x0cregion_codes\x18\x02 \x03(\t\"R\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\t\n\x05MACOS\x10\x03\x12\x0b\n\x07WINDOWS\x10\x04\"\x9c\x01\n\x17\x43reateSubmissionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12<\n\nsubmission\x18\x02 \x01(\x0b\x32#.google.cloud.webrisk.v1.SubmissionB\x03\xe0\x41\x02\"\x93\x02\n\x10SubmitUriRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12<\n\nsubmission\x18\x02 \x01(\x0b\x32#.google.cloud.webrisk.v1.SubmissionB\x03\xe0\x41\x02\x12\x38\n\x0bthreat_info\x18\x03 \x01(\x0b\x32#.google.cloud.webrisk.v1.ThreatInfo\x12\x42\n\x10threat_discovery\x18\x04 \x01(\x0b\x32(.google.cloud.webrisk.v1.ThreatDiscovery\"\x99\x02\n\x11SubmitUriMetadata\x12?\n\x05state\x18\x01 \x01(\x0e\x32\x30.google.cloud.webrisk.v1.SubmitUriMetadata.State\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\n\n\x06\x43LOSED\x10\x05*\x8f\x01\n\nThreatType\x12\x1b\n\x17THREAT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MALWARE\x10\x01\x12\x16\n\x12SOCIAL_ENGINEERING\x10\x02\x12\x15\n\x11UNWANTED_SOFTWARE\x10\x03\x12(\n$SOCIAL_ENGINEERING_EXTENDED_COVERAGE\x10\x04*F\n\x0f\x43ompressionType\x12 \n\x1c\x43OMPRESSION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x08\n\x04RICE\x10\x02\x32\xe1\x07\n\x0eWebRiskService\x12\xd3\x01\n\x15\x43omputeThreatListDiff\x12\x35.google.cloud.webrisk.v1.ComputeThreatListDiffRequest\x1a\x36.google.cloud.webrisk.v1.ComputeThreatListDiffResponse\"K\xda\x41%threat_type,version_token,constraints\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/threatLists:computeDiff\x12\x91\x01\n\nSearchUris\x12*.google.cloud.webrisk.v1.SearchUrisRequest\x1a+.google.cloud.webrisk.v1.SearchUrisResponse\"*\xda\x41\x10uri,threat_types\x82\xd3\xe4\x93\x02\x11\x12\x0f/v1/uris:search\x12\xa1\x01\n\x0cSearchHashes\x12,.google.cloud.webrisk.v1.SearchHashesRequest\x1a-.google.cloud.webrisk.v1.SearchHashesResponse\"4\xda\x41\x18hash_prefix,threat_types\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/hashes:search\x12\xb6\x01\n\x10\x43reateSubmission\x12\x30.google.cloud.webrisk.v1.CreateSubmissionRequest\x1a#.google.cloud.webrisk.v1.Submission\"K\xda\x41\x11parent,submission\x82\xd3\xe4\x93\x02\x31\"#/v1/{parent=projects/*}/submissions:\nsubmission\x12\xbb\x01\n\tSubmitUri\x12).google.cloud.webrisk.v1.SubmitUriRequest\x1a\x1d.google.longrunning.Operation\"d\xca\x41\x1f\n\nSubmission\x12\x11SubmitUriMetadata\xda\x41\x11parent,submission\x82\xd3\xe4\x93\x02(\"#/v1/{parent=projects/*}/uris:submit:\x01*\x1aJ\xca\x41\x16webrisk.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb6\x01\n\x15\x63om.google.webrisk.v1B\x0cWebRiskProtoP\x01Z5cloud.google.com/go/webrisk/apiv1/webriskpb;webriskpb\xa2\x02\x04GCWR\xaa\x02\x17Google.Cloud.WebRisk.V1\xca\x02\x17Google\\Cloud\\WebRisk\\V1\xea\x02\x1aGoogle::Cloud::WebRisk::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebRisk + module V1 + ComputeThreatListDiffRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffRequest").msgclass + ComputeThreatListDiffRequest::Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints").msgclass + ComputeThreatListDiffResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffResponse").msgclass + ComputeThreatListDiffResponse::Checksum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum").msgclass + ComputeThreatListDiffResponse::ResponseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType").enummodule + SearchUrisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchUrisRequest").msgclass + SearchUrisResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchUrisResponse").msgclass + SearchUrisResponse::ThreatUri = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri").msgclass + SearchHashesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchHashesRequest").msgclass + SearchHashesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchHashesResponse").msgclass + SearchHashesResponse::ThreatHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash").msgclass + ThreatEntryAdditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatEntryAdditions").msgclass + ThreatEntryRemovals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatEntryRemovals").msgclass + RawIndices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.RawIndices").msgclass + RawHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.RawHashes").msgclass + RiceDeltaEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.RiceDeltaEncoding").msgclass + Submission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.Submission").msgclass + ThreatInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo").msgclass + ThreatInfo::Confidence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.Confidence").msgclass + ThreatInfo::Confidence::ConfidenceLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel").enummodule + ThreatInfo::ThreatJustification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.ThreatJustification").msgclass + ThreatInfo::ThreatJustification::JustificationLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel").enummodule + ThreatInfo::AbuseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.AbuseType").enummodule + ThreatDiscovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatDiscovery").msgclass + ThreatDiscovery::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatDiscovery.Platform").enummodule + CreateSubmissionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.CreateSubmissionRequest").msgclass + SubmitUriRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SubmitUriRequest").msgclass + SubmitUriMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SubmitUriMetadata").msgclass + SubmitUriMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SubmitUriMetadata.State").enummodule + ThreatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatType").enummodule + CompressionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.CompressionType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_services_pb.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_services_pb.rb new file mode 100644 index 000000000000..c3a55b60711c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_services_pb.rb @@ -0,0 +1,82 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/webrisk/v1/webrisk.proto for package 'Google.Cloud.WebRisk.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/webrisk/v1/webrisk_pb' + +module Google + module Cloud + module WebRisk + module V1 + module WebRiskService + # Web Risk API defines an interface to detect malicious URLs on your + # website and in client applications. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.webrisk.v1.WebRiskService' + + # Gets the most recent threat list diffs. These diffs should be applied to + # a local database of hashes to keep it up-to-date. If the local database is + # empty or excessively out-of-date, a complete snapshot of the database will + # be returned. This Method only updates a single ThreatList at a time. To + # update multiple ThreatList databases, this method needs to be called once + # for each list. + rpc :ComputeThreatListDiff, ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse + # This method is used to check whether a URI is on a given threatList. + # Multiple threatLists may be searched in a single query. + # The response will list all requested threatLists the URI was found to + # match. If the URI is not found on any of the requested ThreatList an + # empty response will be returned. + rpc :SearchUris, ::Google::Cloud::WebRisk::V1::SearchUrisRequest, ::Google::Cloud::WebRisk::V1::SearchUrisResponse + # Gets the full hashes that match the requested hash prefix. + # This is used after a hash prefix is looked up in a threatList + # and there is a match. The client side threatList only holds partial hashes + # so the client must query this method to determine if there is a full + # hash match of a threat. + rpc :SearchHashes, ::Google::Cloud::WebRisk::V1::SearchHashesRequest, ::Google::Cloud::WebRisk::V1::SearchHashesResponse + # Creates a Submission of a URI suspected of containing phishing content to + # be reviewed. If the result verifies the existence of malicious phishing + # content, the site will be added to the [Google's Social Engineering + # lists](https://support.google.com/webmasters/answer/6350487/) in order to + # protect users that could get exposed to this threat in the future. Only + # allowlisted projects can use this method during Early Access. Please reach + # out to Sales or your customer engineer to obtain access. + rpc :CreateSubmission, ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, ::Google::Cloud::WebRisk::V1::Submission + # Submits a URI suspected of containing malicious content to be reviewed. + # Returns a google.longrunning.Operation which, once the review is complete, + # is updated with its result. You can use the [Pub/Sub API] + # (https://cloud.google.com/pubsub) to receive notifications for the returned + # Operation. If the result verifies the existence of malicious content, the + # site will be added to the [Google's Social Engineering lists] + # (https://support.google.com/webmasters/answer/6350487/) in order to + # protect users that could get exposed to this threat in the future. Only + # allowlisted projects can use this method during Early Access. Please reach + # out to Sales or your customer engineer to obtain access. + rpc :SubmitUri, ::Google::Cloud::WebRisk::V1::SubmitUriRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/README.md new file mode 100644 index 000000000000..3b26f78c15d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Web Risk 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-web_risk-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/cloud/webrisk/v1/webrisk.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/cloud/webrisk/v1/webrisk.rb new file mode 100644 index 000000000000..bf4b11141acb --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/cloud/webrisk/v1/webrisk.rb @@ -0,0 +1,528 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebRisk + module V1 + # Describes an API diff request. + # @!attribute [rw] threat_type + # @return [::Google::Cloud::WebRisk::V1::ThreatType] + # Required. The threat list to update. Only a single ThreatType should be + # specified per request. If you want to handle multiple ThreatTypes, you must + # make one request per ThreatType. + # @!attribute [rw] version_token + # @return [::String] + # The current version token of the client for the requested list (the + # client version that was received from the last successful diff). + # If the client does not have a version token (this is the first time calling + # ComputeThreatListDiff), this may be left empty and a full database + # snapshot will be returned. + # @!attribute [rw] constraints + # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints] + # Required. The constraints associated with this request. + class ComputeThreatListDiffRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The constraints for this diff. + # @!attribute [rw] max_diff_entries + # @return [::Integer] + # The maximum size in number of entries. The diff will not contain more + # entries than this value. This should be a power of 2 between 2**10 and + # 2**20. If zero, no diff size limit is set. + # @!attribute [rw] max_database_entries + # @return [::Integer] + # Sets the maximum number of entries that the client is willing to have + # in the local database. This should be a power of 2 between 2**10 and + # 2**20. If zero, no database size limit is set. + # @!attribute [rw] supported_compressions + # @return [::Array<::Google::Cloud::WebRisk::V1::CompressionType>] + # The compression types supported by the client. + class Constraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] response_type + # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse::ResponseType] + # The type of response. This may indicate that an action must be taken by the + # client when the response is received. + # @!attribute [rw] additions + # @return [::Google::Cloud::WebRisk::V1::ThreatEntryAdditions] + # A set of entries to add to a local threat type's list. + # @!attribute [rw] removals + # @return [::Google::Cloud::WebRisk::V1::ThreatEntryRemovals] + # A set of entries to remove from a local threat type's list. + # This field may be empty. + # @!attribute [rw] new_version_token + # @return [::String] + # The new opaque client version token. This should be retained by the client + # and passed into the next call of ComputeThreatListDiff as 'version_token'. + # A separate version token should be stored and used for each threatList. + # @!attribute [rw] checksum + # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse::Checksum] + # The expected SHA256 hash of the client state; that is, of the sorted list + # of all hashes present in the database after applying the provided diff. + # If the client state doesn't match the expected state, the client must + # discard this diff and retry later. + # @!attribute [rw] recommended_next_diff + # @return [::Google::Protobuf::Timestamp] + # The soonest the client should wait before issuing any diff + # request. Querying sooner is unlikely to produce a meaningful diff. + # Waiting longer is acceptable considering the use case. + # If this field is not set clients may update as soon as they want. + class ComputeThreatListDiffResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The expected state of a client's local database. + # @!attribute [rw] sha256 + # @return [::String] + # The SHA256 hash of the client state; that is, of the sorted list of all + # hashes present in the database. + class Checksum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of response sent to the client. + module ResponseType + # Unknown. + RESPONSE_TYPE_UNSPECIFIED = 0 + + # Partial updates are applied to the client's existing local database. + DIFF = 1 + + # Full updates resets the client's entire local database. This means + # that either the client had no state, was seriously out-of-date, + # or the client is believed to be corrupt. + RESET = 2 + end + end + + # Request to check URI entries against threatLists. + # @!attribute [rw] uri + # @return [::String] + # Required. The URI to be checked for matches. + # @!attribute [rw] threat_types + # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] + # Required. The ThreatLists to search in. Multiple ThreatLists may be + # specified. + class SearchUrisRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] threat + # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse::ThreatUri] + # The threat list matches. This might be empty if the URI is on no list. + class SearchUrisResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains threat information on a matching uri. + # @!attribute [rw] threat_types + # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] + # The ThreatList this threat belongs to. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # The cache lifetime for the returned match. Clients must not cache this + # response past this timestamp to avoid false positives. + class ThreatUri + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request to return full hashes matched by the provided hash prefixes. + # @!attribute [rw] hash_prefix + # @return [::String] + # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + # hash. For JSON requests, this field is base64-encoded. + # Note that if this parameter is provided by a URI, it must be encoded using + # the web safe base64 variant (RFC 4648). + # @!attribute [rw] threat_types + # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] + # Required. The ThreatLists to search in. Multiple ThreatLists may be + # specified. + class SearchHashesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] threats + # @return [::Array<::Google::Cloud::WebRisk::V1::SearchHashesResponse::ThreatHash>] + # The full hashes that matched the requested prefixes. + # The hash will be populated in the key. + # @!attribute [rw] negative_expire_time + # @return [::Google::Protobuf::Timestamp] + # For requested entities that did not match the threat list, how long to + # cache the response until. + class SearchHashesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains threat information on a matching hash. + # @!attribute [rw] threat_types + # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] + # The ThreatList this threat belongs to. + # This must contain at least one entry. + # @!attribute [rw] hash + # @return [::String] + # A 32 byte SHA256 hash. This field is in binary format. For JSON + # requests, hashes are base64-encoded. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # The cache lifetime for the returned match. Clients must not cache this + # response past this timestamp to avoid false positives. + class ThreatHash + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Contains the set of entries to add to a local database. + # May contain a combination of compressed and raw data in a single response. + # @!attribute [rw] raw_hashes + # @return [::Array<::Google::Cloud::WebRisk::V1::RawHashes>] + # The raw SHA256-formatted entries. + # Repeated to allow returning sets of hashes with different prefix sizes. + # @!attribute [rw] rice_hashes + # @return [::Google::Cloud::WebRisk::V1::RiceDeltaEncoding] + # The encoded 4-byte prefixes of SHA256-formatted entries, using a + # Golomb-Rice encoding. The hashes are converted to uint32, sorted in + # ascending order, then delta encoded and stored as encoded_data. + class ThreatEntryAdditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains the set of entries to remove from a local database. + # @!attribute [rw] raw_indices + # @return [::Google::Cloud::WebRisk::V1::RawIndices] + # The raw removal indices for a local list. + # @!attribute [rw] rice_indices + # @return [::Google::Cloud::WebRisk::V1::RiceDeltaEncoding] + # The encoded local, lexicographically-sorted list indices, using a + # Golomb-Rice encoding. Used for sending compressed removal indices. The + # removal indices (uint32) are sorted in ascending order, then delta encoded + # and stored as encoded_data. + class ThreatEntryRemovals + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of raw indices to remove from a local list. + # @!attribute [rw] indices + # @return [::Array<::Integer>] + # The indices to remove from a lexicographically-sorted local list. + class RawIndices + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The uncompressed threat entries in hash format. + # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 + # bytes, but some hashes are lengthened if they collide with the hash of a + # popular URI. + # + # Used for sending ThreatEntryAdditons to clients that do not support + # compression, or when sending non-4-byte hashes to clients that do support + # compression. + # @!attribute [rw] prefix_size + # @return [::Integer] + # The number of bytes for each prefix encoded below. This field can be + # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + # In practice this is almost always 4, except in exceptional circumstances. + # @!attribute [rw] raw_hashes + # @return [::String] + # The hashes, in binary format, concatenated into one long string. Hashes are + # sorted in lexicographic order. For JSON API users, hashes are + # base64-encoded. + class RawHashes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or + # compressed removal indices. + # @!attribute [rw] first_value + # @return [::Integer] + # The offset of the first entry in the encoded data, or, if only a single + # integer was encoded, that single integer's value. If the field is empty or + # missing, assume zero. + # @!attribute [rw] rice_parameter + # @return [::Integer] + # The Golomb-Rice parameter, which is a number between 2 and 28. This field + # is missing (that is, zero) if `num_entries` is zero. + # @!attribute [rw] entry_count + # @return [::Integer] + # The number of entries that are delta encoded in the encoded data. If only a + # single integer was encoded, this will be zero and the single value will be + # stored in `first_value`. + # @!attribute [rw] encoded_data + # @return [::String] + # The encoded deltas that are encoded using the Golomb-Rice coder. + class RiceDeltaEncoding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wraps a URI that might be displaying malicious content. + # @!attribute [rw] uri + # @return [::String] + # Required. The URI that is being reported for malicious content to be + # analyzed. + # @!attribute [r] threat_types + # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] + # Output only. ThreatTypes found to be associated with the submitted URI + # after reviewing it. This might be empty if the URI was not added to any + # list. + class Submission + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Context about the submission including the type of abuse found on the URI and + # supporting details. + # @!attribute [rw] abuse_type + # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::AbuseType] + # The type of abuse. + # @!attribute [rw] threat_confidence + # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::Confidence] + # Confidence that the URI is unsafe. + # @!attribute [rw] threat_justification + # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::ThreatJustification] + # Context about why the URI is unsafe. + class ThreatInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Confidence that a URI is unsafe. + # @!attribute [rw] score + # @return [::Float] + # A decimal representation of confidence in the range of 0 + # to 1 where 0 indicates no confidence and 1 indicates + # complete confidence. + # + # Note: The following fields are mutually exclusive: `score`, `level`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] level + # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::Confidence::ConfidenceLevel] + # Enum representation of confidence. + # + # Note: The following fields are mutually exclusive: `level`, `score`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Confidence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum representation of confidence. + module ConfidenceLevel + # Default. + CONFIDENCE_LEVEL_UNSPECIFIED = 0 + + # Less than 60% confidence that the URI is unsafe. + LOW = 1 + + # Between 60% and 80% confidence that the URI is unsafe. + MEDIUM = 2 + + # Greater than 80% confidence that the URI is unsafe. + HIGH = 3 + end + end + + # Context about why the URI is unsafe. + # @!attribute [rw] labels + # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatInfo::ThreatJustification::JustificationLabel>] + # Labels associated with this URI that explain how it was classified. + # @!attribute [rw] comments + # @return [::Array<::String>] + # Free-form context on why this URI is unsafe. + class ThreatJustification + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Labels that explain how the URI was classified. + module JustificationLabel + # Default. + JUSTIFICATION_LABEL_UNSPECIFIED = 0 + + # The submitter manually verified that the submission is unsafe. + MANUAL_VERIFICATION = 1 + + # The submitter received the submission from an end user. + USER_REPORT = 2 + + # The submitter received the submission from an automated system. + AUTOMATED_REPORT = 3 + end + end + + # The abuse type found on the URI. + module AbuseType + # Default. + ABUSE_TYPE_UNSPECIFIED = 0 + + # The URI contains malware. + MALWARE = 1 + + # The URI contains social engineering. + SOCIAL_ENGINEERING = 2 + + # The URI contains unwanted software. + UNWANTED_SOFTWARE = 3 + end + end + + # Details about how the threat was discovered. + # @!attribute [rw] platform + # @return [::Google::Cloud::WebRisk::V1::ThreatDiscovery::Platform] + # Platform on which the threat was discovered. + # @!attribute [rw] region_codes + # @return [::Array<::String>] + # CLDR region code of the countries/regions the URI poses a threat ordered + # from most impact to least impact. Example: "US" for United States. + class ThreatDiscovery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Platform types. + module Platform + # Default. + PLATFORM_UNSPECIFIED = 0 + + # General Android platform. + ANDROID = 1 + + # General iOS platform. + IOS = 2 + + # General macOS platform. + MACOS = 3 + + # General Windows platform. + WINDOWS = 4 + end + end + + # Request to send a potentially phishy URI to WebRisk. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project that is making the submission. This + # string is in the format "projects/\\{project_number}". + # @!attribute [rw] submission + # @return [::Google::Cloud::WebRisk::V1::Submission] + # Required. The submission that contains the content of the phishing report. + class CreateSubmissionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to send a potentially malicious URI to WebRisk. + # @!attribute [rw] parent + # @return [::String] + # Required. The name of the project that is making the submission. This + # string is in the format "projects/\\{project_number}". + # @!attribute [rw] submission + # @return [::Google::Cloud::WebRisk::V1::Submission] + # Required. The submission that contains the URI to be scanned. + # @!attribute [rw] threat_info + # @return [::Google::Cloud::WebRisk::V1::ThreatInfo] + # Provides additional information about the submission. + # @!attribute [rw] threat_discovery + # @return [::Google::Cloud::WebRisk::V1::ThreatDiscovery] + # Provides additional information about how the submission was discovered. + class SubmitUriRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the Submit URI long-running operation. + # @!attribute [rw] state + # @return [::Google::Cloud::WebRisk::V1::SubmitUriMetadata::State] + # The state of the operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Creation time of the operation. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Latest update time of the operation. + class SubmitUriMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum that represents the state of the long-running operation. + module State + # Default unspecified state. + STATE_UNSPECIFIED = 0 + + # The operation is currently running. + RUNNING = 1 + + # The operation finished with a success status. + SUCCEEDED = 2 + + # The operation was cancelled. + CANCELLED = 3 + + # The operation finished with a failure status. + FAILED = 4 + + # The operation was closed with no action taken. + CLOSED = 5 + end + end + + # The type of threat. This maps directly to the threat list a threat may + # belong to. + module ThreatType + # No entries should match this threat type. This threat type is unused. + THREAT_TYPE_UNSPECIFIED = 0 + + # Malware targeting any platform. + MALWARE = 1 + + # Social engineering targeting any platform. + SOCIAL_ENGINEERING = 2 + + # Unwanted software targeting any platform. + UNWANTED_SOFTWARE = 3 + + # A list of extended coverage social engineering URIs targeting any + # platform. + SOCIAL_ENGINEERING_EXTENDED_COVERAGE = 4 + end + + # The ways in which threat entry sets can be compressed. + module CompressionType + # Unknown. + COMPRESSION_TYPE_UNSPECIFIED = 0 + + # Raw, uncompressed data. + RAW = 1 + + # Rice-Golomb encoded data. + RICE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-web_risk-v1/snippets/Gemfile new file mode 100644 index 000000000000..6a085ad32072 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1", path: "../" +else + gem "google-cloud-web_risk-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-web_risk-v1/snippets/snippet_metadata_google.cloud.webrisk.v1.json b/owl-bot-staging/google-cloud-web_risk-v1/snippets/snippet_metadata_google.cloud.webrisk.v1.json new file mode 100644 index 000000000000..b80bf1f12e06 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/snippets/snippet_metadata_google.cloud.webrisk.v1.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-cloud-web_risk-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.webrisk.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync", + "title": "Snippet for the compute_threat_list_diff call in the WebRiskService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#compute_threat_list_diff.", + "file": "web_risk_service/compute_threat_list_diff.rb", + "language": "RUBY", + "client_method": { + "short_name": "compute_threat_list_diff", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#compute_threat_list_diff", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse", + "client": { + "short_name": "WebRiskService::Client", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" + }, + "method": { + "short_name": "ComputeThreatListDiff", + "full_name": "google.cloud.webrisk.v1.WebRiskService.ComputeThreatListDiff", + "service": { + "short_name": "WebRiskService", + "full_name": "google.cloud.webrisk.v1.WebRiskService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "webrisk_v1_generated_WebRiskService_SearchUris_sync", + "title": "Snippet for the search_uris call in the WebRiskService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#search_uris.", + "file": "web_risk_service/search_uris.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_uris", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#search_uris", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebRisk::V1::SearchUrisRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebRisk::V1::SearchUrisResponse", + "client": { + "short_name": "WebRiskService::Client", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" + }, + "method": { + "short_name": "SearchUris", + "full_name": "google.cloud.webrisk.v1.WebRiskService.SearchUris", + "service": { + "short_name": "WebRiskService", + "full_name": "google.cloud.webrisk.v1.WebRiskService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "webrisk_v1_generated_WebRiskService_SearchHashes_sync", + "title": "Snippet for the search_hashes call in the WebRiskService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#search_hashes.", + "file": "web_risk_service/search_hashes.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_hashes", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#search_hashes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebRisk::V1::SearchHashesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebRisk::V1::SearchHashesResponse", + "client": { + "short_name": "WebRiskService::Client", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" + }, + "method": { + "short_name": "SearchHashes", + "full_name": "google.cloud.webrisk.v1.WebRiskService.SearchHashes", + "service": { + "short_name": "WebRiskService", + "full_name": "google.cloud.webrisk.v1.WebRiskService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "webrisk_v1_generated_WebRiskService_CreateSubmission_sync", + "title": "Snippet for the create_submission call in the WebRiskService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#create_submission.", + "file": "web_risk_service/create_submission.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_submission", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#create_submission", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebRisk::V1::CreateSubmissionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebRisk::V1::Submission", + "client": { + "short_name": "WebRiskService::Client", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" + }, + "method": { + "short_name": "CreateSubmission", + "full_name": "google.cloud.webrisk.v1.WebRiskService.CreateSubmission", + "service": { + "short_name": "WebRiskService", + "full_name": "google.cloud.webrisk.v1.WebRiskService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "webrisk_v1_generated_WebRiskService_SubmitUri_sync", + "title": "Snippet for the submit_uri call in the WebRiskService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#submit_uri.", + "file": "web_risk_service/submit_uri.rb", + "language": "RUBY", + "client_method": { + "short_name": "submit_uri", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#submit_uri", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebRisk::V1::SubmitUriRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "WebRiskService::Client", + "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" + }, + "method": { + "short_name": "SubmitUri", + "full_name": "google.cloud.webrisk.v1.WebRiskService.SubmitUri", + "service": { + "short_name": "WebRiskService", + "full_name": "google.cloud.webrisk.v1.WebRiskService" + } + } + }, + "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-web_risk-v1/snippets/web_risk_service/compute_threat_list_diff.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/compute_threat_list_diff.rb new file mode 100644 index 000000000000..7f5a53f82d9a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/compute_threat_list_diff.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync] +require "google/cloud/web_risk/v1" + +## +# Snippet for the compute_threat_list_diff call in the WebRiskService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebRisk::V1::WebRiskService::Client#compute_threat_list_diff. +# +def compute_threat_list_diff + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new + + # Call the compute_threat_list_diff method. + result = client.compute_threat_list_diff request + + # The returned object is of type Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse. + p result +end +# [END webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/create_submission.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/create_submission.rb new file mode 100644 index 000000000000..df7d3813ecdc --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/create_submission.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START webrisk_v1_generated_WebRiskService_CreateSubmission_sync] +require "google/cloud/web_risk/v1" + +## +# Snippet for the create_submission call in the WebRiskService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebRisk::V1::WebRiskService::Client#create_submission. +# +def create_submission + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new + + # Call the create_submission method. + result = client.create_submission request + + # The returned object is of type Google::Cloud::WebRisk::V1::Submission. + p result +end +# [END webrisk_v1_generated_WebRiskService_CreateSubmission_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_hashes.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_hashes.rb new file mode 100644 index 000000000000..dd666b618ada --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_hashes.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START webrisk_v1_generated_WebRiskService_SearchHashes_sync] +require "google/cloud/web_risk/v1" + +## +# Snippet for the search_hashes call in the WebRiskService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebRisk::V1::WebRiskService::Client#search_hashes. +# +def search_hashes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebRisk::V1::SearchHashesRequest.new + + # Call the search_hashes method. + result = client.search_hashes request + + # The returned object is of type Google::Cloud::WebRisk::V1::SearchHashesResponse. + p result +end +# [END webrisk_v1_generated_WebRiskService_SearchHashes_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_uris.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_uris.rb new file mode 100644 index 000000000000..f9689a938b35 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_uris.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START webrisk_v1_generated_WebRiskService_SearchUris_sync] +require "google/cloud/web_risk/v1" + +## +# Snippet for the search_uris call in the WebRiskService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebRisk::V1::WebRiskService::Client#search_uris. +# +def search_uris + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebRisk::V1::SearchUrisRequest.new + + # Call the search_uris method. + result = client.search_uris request + + # The returned object is of type Google::Cloud::WebRisk::V1::SearchUrisResponse. + p result +end +# [END webrisk_v1_generated_WebRiskService_SearchUris_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/submit_uri.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/submit_uri.rb new file mode 100644 index 000000000000..e9576276d743 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/submit_uri.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START webrisk_v1_generated_WebRiskService_SubmitUri_sync] +require "google/cloud/web_risk/v1" + +## +# Snippet for the submit_uri call in the WebRiskService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebRisk::V1::WebRiskService::Client#submit_uri. +# +def submit_uri + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebRisk::V1::SubmitUriRequest.new + + # Call the submit_uri method. + result = client.submit_uri request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END webrisk_v1_generated_WebRiskService_SubmitUri_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_operations_test.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_operations_test.rb new file mode 100644 index 000000000000..2dbc348b4d90 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_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/webrisk/v1/webrisk_pb" +require "google/cloud/webrisk/v1/webrisk_services_pb" +require "google/cloud/web_risk/v1/web_risk_service" + +class ::Google::Cloud::WebRisk::V1::WebRiskService::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_paths_test.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_paths_test.rb new file mode 100644 index 000000000000..4611e7b7e506 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_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/web_risk/v1/web_risk_service" + +class ::Google::Cloud::WebRisk::V1::WebRiskService::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_project_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_rest_test.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_rest_test.rb new file mode 100644 index 000000000000..a4b46ebc0c22 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_rest_test.rb @@ -0,0 +1,377 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/webrisk/v1/webrisk_pb" +require "google/cloud/web_risk/v1/web_risk_service/rest" + + +class ::Google::Cloud::WebRisk::V1::WebRiskService::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_compute_threat_list_diff + # Create test objects. + client_result = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + threat_type = :THREAT_TYPE_UNSPECIFIED + version_token = "hello world" + constraints = {} + + compute_threat_list_diff_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_compute_threat_list_diff_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, compute_threat_list_diff_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.compute_threat_list_diff threat_type: threat_type, version_token: version_token, constraints: constraints do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.compute_threat_list_diff ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.compute_threat_list_diff(::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, compute_threat_list_diff_client_stub.call_count + end + end + end + + def test_search_uris + # Create test objects. + client_result = ::Google::Cloud::WebRisk::V1::SearchUrisResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + uri = "hello world" + threat_types = [:THREAT_TYPE_UNSPECIFIED] + + search_uris_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_search_uris_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_uris_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_uris({ uri: uri, threat_types: threat_types }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_uris uri: uri, threat_types: threat_types do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_uris ::Google::Cloud::WebRisk::V1::SearchUrisRequest.new(uri: uri, threat_types: threat_types) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_uris({ uri: uri, threat_types: threat_types }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_uris(::Google::Cloud::WebRisk::V1::SearchUrisRequest.new(uri: uri, threat_types: threat_types), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_uris_client_stub.call_count + end + end + end + + def test_search_hashes + # Create test objects. + client_result = ::Google::Cloud::WebRisk::V1::SearchHashesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + hash_prefix = "hello world" + threat_types = [:THREAT_TYPE_UNSPECIFIED] + + search_hashes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_search_hashes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_hashes_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_hashes hash_prefix: hash_prefix, threat_types: threat_types do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_hashes ::Google::Cloud::WebRisk::V1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_hashes(::Google::Cloud::WebRisk::V1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_hashes_client_stub.call_count + end + end + end + + def test_create_submission + # Create test objects. + client_result = ::Google::Cloud::WebRisk::V1::Submission.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + submission = {} + + create_submission_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_create_submission_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_submission_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_submission({ parent: parent, submission: submission }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_submission parent: parent, submission: submission do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_submission ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new(parent: parent, submission: submission) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_submission({ parent: parent, submission: submission }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_submission(::Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new(parent: parent, submission: submission), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_submission_client_stub.call_count + end + end + end + + def test_submit_uri + # Create test objects. + 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" + submission = {} + threat_info = {} + threat_discovery = {} + + submit_uri_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_submit_uri_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, submit_uri_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.submit_uri({ parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.submit_uri parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.submit_uri ::Google::Cloud::WebRisk::V1::SubmitUriRequest.new(parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.submit_uri({ parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.submit_uri(::Google::Cloud::WebRisk::V1::SubmitUriRequest.new(parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, submit_uri_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::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_test.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_test.rb new file mode 100644 index 000000000000..1d3301dd6810 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_test.rb @@ -0,0 +1,429 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/webrisk/v1/webrisk_pb" +require "google/cloud/web_risk/v1/web_risk_service" + +class ::Google::Cloud::WebRisk::V1::WebRiskService::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_compute_threat_list_diff + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + threat_type = :THREAT_TYPE_UNSPECIFIED + version_token = "hello world" + constraints = {} + + compute_threat_list_diff_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :compute_threat_list_diff, name + assert_kind_of ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, request + assert_equal :THREAT_TYPE_UNSPECIFIED, request["threat_type"] + assert_equal "hello world", request["version_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints), request["constraints"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, compute_threat_list_diff_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.compute_threat_list_diff threat_type: threat_type, version_token: version_token, constraints: constraints do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.compute_threat_list_diff ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.compute_threat_list_diff(::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, compute_threat_list_diff_client_stub.call_rpc_count + end + end + + def test_search_uris + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebRisk::V1::SearchUrisResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + uri = "hello world" + threat_types = [:THREAT_TYPE_UNSPECIFIED] + + search_uris_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_uris, name + assert_kind_of ::Google::Cloud::WebRisk::V1::SearchUrisRequest, request + assert_equal "hello world", request["uri"] + assert_equal [:THREAT_TYPE_UNSPECIFIED], request["threat_types"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_uris_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_uris({ uri: uri, threat_types: threat_types }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_uris uri: uri, threat_types: threat_types do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_uris ::Google::Cloud::WebRisk::V1::SearchUrisRequest.new(uri: uri, threat_types: threat_types) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_uris({ uri: uri, threat_types: threat_types }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_uris(::Google::Cloud::WebRisk::V1::SearchUrisRequest.new(uri: uri, threat_types: threat_types), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_uris_client_stub.call_rpc_count + end + end + + def test_search_hashes + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebRisk::V1::SearchHashesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + hash_prefix = "hello world" + threat_types = [:THREAT_TYPE_UNSPECIFIED] + + search_hashes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_hashes, name + assert_kind_of ::Google::Cloud::WebRisk::V1::SearchHashesRequest, request + assert_equal "hello world", request["hash_prefix"] + assert_equal [:THREAT_TYPE_UNSPECIFIED], request["threat_types"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_hashes_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_hashes hash_prefix: hash_prefix, threat_types: threat_types do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_hashes ::Google::Cloud::WebRisk::V1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_hashes(::Google::Cloud::WebRisk::V1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_hashes_client_stub.call_rpc_count + end + end + + def test_create_submission + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebRisk::V1::Submission.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + submission = {} + + create_submission_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_submission, name + assert_kind_of ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::Submission), request["submission"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_submission_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_submission({ parent: parent, submission: submission }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_submission parent: parent, submission: submission do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_submission ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new(parent: parent, submission: submission) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_submission({ parent: parent, submission: submission }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_submission(::Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new(parent: parent, submission: submission), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_submission_client_stub.call_rpc_count + end + end + + def test_submit_uri + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + submission = {} + threat_info = {} + threat_discovery = {} + + submit_uri_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :submit_uri, name + assert_kind_of ::Google::Cloud::WebRisk::V1::SubmitUriRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::Submission), request["submission"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::ThreatInfo), request["threat_info"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::ThreatDiscovery), request["threat_discovery"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, submit_uri_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.submit_uri({ parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.submit_uri parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.submit_uri ::Google::Cloud::WebRisk::V1::SubmitUriRequest.new(parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.submit_uri({ parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.submit_uri(::Google::Cloud::WebRisk::V1::SubmitUriRequest.new(parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, submit_uri_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::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::WebRisk::V1::WebRiskService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/helper.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/.gitignore b/owl-bot-staging/google-cloud-web_risk-v1beta1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-web_risk-v1beta1/.repo-metadata.json new file mode 100644 index 000000000000..fe30af6aa1ab --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/.repo-metadata.json @@ -0,0 +1,19 @@ +{ + "api_id": "webrisk.googleapis.com", + "api_shortname": "webrisk", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1beta1/latest", + "distribution_name": "google-cloud-web_risk-v1beta1", + "is_cloud": true, + "language": "ruby", + "name": "webrisk", + "name_pretty": "Web Risk V1beta1 API", + "product_documentation": "https://cloud.google.com/web-risk", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. Note that google-cloud-web_risk-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_risk instead. See the readme for more details.", + "ruby-cloud-env-prefix": "WEBRISK", + "ruby-cloud-product-url": "https://cloud.google.com/web-risk", + "ruby-cloud-service-override": "WebRiskServiceV1Beta1=WebRiskService", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-web_risk-v1beta1/.rubocop.yml new file mode 100644 index 000000000000..259ed15aa523 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-web_risk-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-web_risk-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/.yardopts b/owl-bot-staging/google-cloud-web_risk-v1beta1/.yardopts new file mode 100644 index 000000000000..70af59b70236 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Web Risk 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-web_risk-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/AUTHENTICATION.md new file mode 100644 index 000000000000..402db6205842 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-web_risk-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-web_risk-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/web_risk/v1beta1" + +client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/web_risk/v1beta1" + +::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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-web_risk-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/web_risk/v1beta1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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-web_risk-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/Gemfile b/owl-bot-staging/google-cloud-web_risk-v1beta1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/README.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/README.md new file mode 100644 index 000000000000..523339a7d4ad --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Web Risk V1beta1 API + +API Client library for the Web Risk V1beta1 API + +Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Web Risk V1beta1 API. Most users should consider using +the main client gem, +[google-cloud-web_risk](https://rubygems.org/gems/google-cloud-web_risk). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-web_risk-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/webrisk.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/web_risk/v1beta1" + +client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new +request = ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new # (request fields as keyword arguments...) +response = client.compute_threat_list_diff request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1beta1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/web-risk) +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/web_risk/v1beta1" +require "logger" + +client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-web_risk`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-web_risk-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-web_risk`. +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-web_risk-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-web_risk-v1beta1/Rakefile b/owl-bot-staging/google-cloud-web_risk-v1beta1/Rakefile new file mode 100644 index 000000000000..c9ba69740a31 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WEBRISK_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WEBRISK_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WEBRISK_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 WEBRISK_TEST_PROJECT=test123 WEBRISK_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/web_risk/v1beta1/web_risk_service/credentials" + ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WEBRISK_PROJECT"] = project + ENV["WEBRISK_TEST_PROJECT"] = project + ENV["WEBRISK_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-web_risk-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-web_risk-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-web_risk-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-web_risk-v1beta1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-web_risk-v1beta1" + header "google-cloud-web_risk-v1beta1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-web_risk-v1beta1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-web_risk-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-web_risk-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-web_risk-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-web_risk-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-web_risk-v1beta1/gapic_metadata.json new file mode 100644 index 000000000000..5c1de79e5f6d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.webrisk.v1beta1", + "libraryPackage": "::Google::Cloud::WebRisk::V1beta1", + "services": { + "WebRiskServiceV1Beta1": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client", + "rpcs": { + "ComputeThreatListDiff": { + "methods": [ + "compute_threat_list_diff" + ] + }, + "SearchUris": { + "methods": [ + "search_uris" + ] + }, + "SearchHashes": { + "methods": [ + "search_hashes" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/google-cloud-web_risk-v1beta1.gemspec b/owl-bot-staging/google-cloud-web_risk-v1beta1/google-cloud-web_risk-v1beta1.gemspec new file mode 100644 index 000000000000..e72c804552f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/google-cloud-web_risk-v1beta1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/web_risk/v1beta1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-web_risk-v1beta1" + gem.version = Google::Cloud::WebRisk::V1beta1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. Note that google-cloud-web_risk-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_risk instead. See the readme for more details." + gem.summary = "API Client library for the Web Risk 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.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google-cloud-web_risk-v1beta1.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google-cloud-web_risk-v1beta1.rb new file mode 100644 index 000000000000..c49ea8ac5445 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google-cloud-web_risk-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/web_risk/v1beta1" diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1.rb new file mode 100644 index 000000000000..05c5ff6acfc4 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/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/web_risk/v1beta1/web_risk_service" +require "google/cloud/web_risk/v1beta1/version" + +module Google + module Cloud + module WebRisk + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/web_risk/v1beta1" + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/web_risk/v1beta1" + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new + # + module V1beta1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" +require "google/cloud/web_risk/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/rest.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/rest.rb new file mode 100644 index 000000000000..ee8a517b8f9c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/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/web_risk/v1beta1/web_risk_service/rest" +require "google/cloud/web_risk/v1beta1/version" + +module Google + module Cloud + module WebRisk + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/web_risk/v1beta1/rest" + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new + # + module V1beta1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/version.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/version.rb new file mode 100644 index 000000000000..8cfd7d301ca1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/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 WebRisk + module V1beta1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service.rb new file mode 100644 index 000000000000..738b01841c1a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/web_risk/v1beta1/version" + +require "google/cloud/web_risk/v1beta1/web_risk_service/credentials" +require "google/cloud/web_risk/v1beta1/web_risk_service/client" +require "google/cloud/web_risk/v1beta1/web_risk_service/rest" + +module Google + module Cloud + module WebRisk + module V1beta1 + ## + # Web Risk v1beta1 API defines an interface to detect malicious URLs on your + # website and in client applications. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/web_risk/v1beta1/web_risk_service" + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/web_risk/v1beta1/web_risk_service/rest" + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new + # + module WebRiskService + end + end + end + end +end + +helper_path = ::File.join __dir__, "web_risk_service", "helpers.rb" +require "google/cloud/web_risk/v1beta1/web_risk_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/client.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/client.rb new file mode 100644 index 000000000000..88d026e5d188 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/client.rb @@ -0,0 +1,662 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/webrisk/v1beta1/webrisk_pb" + +module Google + module Cloud + module WebRisk + module V1beta1 + module WebRiskService + ## + # Client for the WebRiskService service. + # + # Web Risk v1beta1 API defines an interface to detect malicious URLs on your + # website and in client applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :web_risk_service_stub + + ## + # Configure the WebRiskService Client class. + # + # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WebRiskService clients + # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "WebRisk", "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.compute_threat_list_diff.timeout = 600.0 + default_config.rpcs.compute_threat_list_diff.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_uris.timeout = 600.0 + default_config.rpcs.search_uris.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_hashes.timeout = 600.0 + default_config.rpcs.search_hashes.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 WebRiskService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @web_risk_service_stub.universe_domain + end + + ## + # Create a new WebRiskService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WebRiskService 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/webrisk/v1beta1/webrisk_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 + + @web_risk_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::WebRisk::V1beta1::WebRiskServiceV1Beta1::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 + ) + + @web_risk_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 + @web_risk_service_stub.logger + end + + # Service calls + + ## + # Gets the most recent threat list diffs. + # + # @overload compute_threat_list_diff(request, options = nil) + # Pass arguments to `compute_threat_list_diff` via a request object, either of type + # {::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil) + # Pass arguments to `compute_threat_list_diff` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param threat_type [::Google::Cloud::WebRisk::V1beta1::ThreatType] + # The ThreatList to update. + # @param version_token [::String] + # The current version token of the client for the requested list (the + # client version that was received from the last successful diff). + # @param constraints [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints, ::Hash] + # Required. The constraints associated with this request. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new + # + # # Call the compute_threat_list_diff method. + # result = client.compute_threat_list_diff request + # + # # The returned object is of type Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse. + # p result + # + def compute_threat_list_diff request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1beta1::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.compute_threat_list_diff.timeout, + metadata: metadata, + retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.call_rpc :compute_threat_list_diff, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # This method is used to check whether a URI is on a given threatList. + # + # @overload search_uris(request, options = nil) + # Pass arguments to `search_uris` via a request object, either of type + # {::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_uris(uri: nil, threat_types: nil) + # Pass arguments to `search_uris` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param uri [::String] + # Required. The URI to be checked for matches. + # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] + # Required. The ThreatLists to search in. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new + # + # # Call the search_uris method. + # result = client.search_uris request + # + # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchUrisResponse. + # p result + # + def search_uris request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest + + # Converts hash and nil to 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_uris.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1beta1::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.search_uris.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_uris.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.call_rpc :search_uris, request, 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 full hashes that match the requested hash prefix. + # This is used after a hash prefix is looked up in a threatList + # and there is a match. The client side threatList only holds partial hashes + # so the client must query this method to determine if there is a full + # hash match of a threat. + # + # @overload search_hashes(request, options = nil) + # Pass arguments to `search_hashes` via a request object, either of type + # {::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hashes(hash_prefix: nil, threat_types: nil) + # Pass arguments to `search_hashes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param hash_prefix [::String] + # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + # hash. For JSON requests, this field is base64-encoded. + # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] + # Required. The ThreatLists to search in. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new + # + # # Call the search_hashes method. + # result = client.search_hashes request + # + # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchHashesResponse. + # p result + # + def search_hashes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest + + # Converts hash and nil to 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_hashes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::V1beta1::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.search_hashes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.search_hashes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.call_rpc :search_hashes, request, 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 WebRiskService API. + # + # This class represents the configuration for WebRiskService, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # compute_threat_list_diff to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.compute_threat_list_diff.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.compute_threat_list_diff.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::WebRisk::V1beta1::WebRiskService::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "webrisk.googleapis.com" + + config_attr :endpoint, nil, ::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 WebRiskService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `compute_threat_list_diff` + # @return [::Gapic::Config::Method] + # + attr_reader :compute_threat_list_diff + ## + # RPC-specific configuration for `search_uris` + # @return [::Gapic::Config::Method] + # + attr_reader :search_uris + ## + # RPC-specific configuration for `search_hashes` + # @return [::Gapic::Config::Method] + # + attr_reader :search_hashes + + # @private + def initialize parent_rpcs = nil + compute_threat_list_diff_config = parent_rpcs.compute_threat_list_diff if parent_rpcs.respond_to? :compute_threat_list_diff + @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config + search_uris_config = parent_rpcs.search_uris if parent_rpcs.respond_to? :search_uris + @search_uris = ::Gapic::Config::Method.new search_uris_config + search_hashes_config = parent_rpcs.search_hashes if parent_rpcs.respond_to? :search_hashes + @search_hashes = ::Gapic::Config::Method.new search_hashes_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/credentials.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/credentials.rb new file mode 100644 index 000000000000..36e4e8d572dc --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_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 WebRisk + module V1beta1 + module WebRiskService + # Credentials for the WebRiskService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "WEBRISK_CREDENTIALS", + "WEBRISK_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "WEBRISK_CREDENTIALS_JSON", + "WEBRISK_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-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest.rb new file mode 100644 index 000000000000..641b01af11e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/web_risk/v1beta1/version" + +require "google/cloud/web_risk/v1beta1/web_risk_service/credentials" +require "google/cloud/web_risk/v1beta1/web_risk_service/rest/client" + +module Google + module Cloud + module WebRisk + module V1beta1 + ## + # Web Risk v1beta1 API defines an interface to detect malicious URLs on your + # website and in client applications. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/web_risk/v1beta1/web_risk_service/rest" + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new + # + module WebRiskService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/web_risk/v1beta1/web_risk_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/client.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/client.rb new file mode 100644 index 000000000000..1709cfcb3b5f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/client.rb @@ -0,0 +1,622 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/webrisk/v1beta1/webrisk_pb" +require "google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub" + +module Google + module Cloud + module WebRisk + module V1beta1 + module WebRiskService + module Rest + ## + # REST client for the WebRiskService service. + # + # Web Risk v1beta1 API defines an interface to detect malicious URLs on your + # website and in client applications. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :web_risk_service_stub + + ## + # Configure the WebRiskService Client class. + # + # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WebRiskService clients + # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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", "WebRisk", "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.compute_threat_list_diff.timeout = 600.0 + default_config.rpcs.compute_threat_list_diff.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_uris.timeout = 600.0 + default_config.rpcs.search_uris.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.search_hashes.timeout = 600.0 + default_config.rpcs.search_hashes.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 WebRiskService Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::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 + @web_risk_service_stub.universe_domain + end + + ## + # Create a new WebRiskService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WebRiskService 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 + + @web_risk_service_stub = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @web_risk_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 + @web_risk_service_stub.logger + end + + # Service calls + + ## + # Gets the most recent threat list diffs. + # + # @overload compute_threat_list_diff(request, options = nil) + # Pass arguments to `compute_threat_list_diff` via a request object, either of type + # {::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil) + # Pass arguments to `compute_threat_list_diff` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param threat_type [::Google::Cloud::WebRisk::V1beta1::ThreatType] + # The ThreatList to update. + # @param version_token [::String] + # The current version token of the client for the requested list (the + # client version that was received from the last successful diff). + # @param constraints [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints, ::Hash] + # Required. The constraints associated with this request. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new + # + # # Call the compute_threat_list_diff method. + # result = client.compute_threat_list_diff request + # + # # The returned object is of type Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse. + # p result + # + def compute_threat_list_diff request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::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.compute_threat_list_diff.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.compute_threat_list_diff request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # This method is used to check whether a URI is on a given threatList. + # + # @overload search_uris(request, options = nil) + # Pass arguments to `search_uris` via a request object, either of type + # {::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_uris(uri: nil, threat_types: nil) + # Pass arguments to `search_uris` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param uri [::String] + # Required. The URI to be checked for matches. + # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] + # Required. The ThreatLists to search in. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new + # + # # Call the search_uris method. + # result = client.search_uris request + # + # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchUrisResponse. + # p result + # + def search_uris request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest + + # Converts hash and nil to an 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_uris.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::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.search_uris.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_uris.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.search_uris request, 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 full hashes that match the requested hash prefix. + # This is used after a hash prefix is looked up in a threatList + # and there is a match. The client side threatList only holds partial hashes + # so the client must query this method to determine if there is a full + # hash match of a threat. + # + # @overload search_hashes(request, options = nil) + # Pass arguments to `search_hashes` via a request object, either of type + # {::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hashes(hash_prefix: nil, threat_types: nil) + # Pass arguments to `search_hashes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param hash_prefix [::String] + # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + # hash. For JSON requests, this field is base64-encoded. + # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] + # Required. The ThreatLists to search in. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_risk/v1beta1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new + # + # # Call the search_hashes method. + # result = client.search_hashes request + # + # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchHashesResponse. + # p result + # + def search_hashes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest + + # Converts hash and nil to an 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_hashes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebRisk::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.search_hashes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.search_hashes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_risk_service_stub.search_hashes request, 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 WebRiskService REST API. + # + # This class represents the configuration for WebRiskService 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::WebRisk::V1beta1::WebRiskService::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 + # # compute_threat_list_diff to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.compute_threat_list_diff.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.compute_threat_list_diff.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "webrisk.googleapis.com" + + config_attr :endpoint, nil, ::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 WebRiskService API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `compute_threat_list_diff` + # @return [::Gapic::Config::Method] + # + attr_reader :compute_threat_list_diff + ## + # RPC-specific configuration for `search_uris` + # @return [::Gapic::Config::Method] + # + attr_reader :search_uris + ## + # RPC-specific configuration for `search_hashes` + # @return [::Gapic::Config::Method] + # + attr_reader :search_hashes + + # @private + def initialize parent_rpcs = nil + compute_threat_list_diff_config = parent_rpcs.compute_threat_list_diff if parent_rpcs.respond_to? :compute_threat_list_diff + @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config + search_uris_config = parent_rpcs.search_uris if parent_rpcs.respond_to? :search_uris + @search_uris = ::Gapic::Config::Method.new search_uris_config + search_hashes_config = parent_rpcs.search_hashes if parent_rpcs.respond_to? :search_hashes + @search_hashes = ::Gapic::Config::Method.new search_hashes_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub.rb new file mode 100644 index 000000000000..6138c60c8d86 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub.rb @@ -0,0 +1,258 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/webrisk/v1beta1/webrisk_pb" + +module Google + module Cloud + module WebRisk + module V1beta1 + module WebRiskService + module Rest + ## + # REST service stub for the WebRiskService 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 compute_threat_list_diff REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] + # A result object deserialized from the server's reply + def compute_threat_list_diff request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_compute_threat_list_diff_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "compute_threat_list_diff", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse.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_uris REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] + # A result object deserialized from the server's reply + def search_uris request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_uris_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_uris", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse.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_hashes REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] + # A result object deserialized from the server's reply + def search_hashes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_search_hashes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hashes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse.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 compute_threat_list_diff REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_compute_threat_list_diff_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/threatLists:computeDiff", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_uris REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest] + # 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_uris_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/uris:search", + matches: [] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the search_hashes REST call + # + # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest] + # 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_hashes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta1/hashes:search", + matches: [] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_pb.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_pb.rb new file mode 100644 index 000000000000..6692eda9fc0f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/webrisk/v1beta1/webrisk.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/cloud/webrisk/v1beta1/webrisk.proto\x12\x1cgoogle.cloud.webrisk.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf2\x02\n\x1c\x43omputeThreatListDiffRequest\x12\x42\n\x0bthreat_type\x18\x01 \x01(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatTypeB\x03\xe0\x41\x02\x12\x15\n\rversion_token\x18\x02 \x01(\x0c\x12`\n\x0b\x63onstraints\x18\x03 \x01(\x0b\x32\x46.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsB\x03\xe0\x41\x02\x1a\x94\x01\n\x0b\x43onstraints\x12\x18\n\x10max_diff_entries\x18\x01 \x01(\x05\x12\x1c\n\x14max_database_entries\x18\x02 \x01(\x05\x12M\n\x16supported_compressions\x18\x03 \x03(\x0e\x32-.google.cloud.webrisk.v1beta1.CompressionType\"\x9a\x04\n\x1d\x43omputeThreatListDiffResponse\x12_\n\rresponse_type\x18\x04 \x01(\x0e\x32H.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType\x12\x45\n\tadditions\x18\x05 \x01(\x0b\x32\x32.google.cloud.webrisk.v1beta1.ThreatEntryAdditions\x12\x43\n\x08removals\x18\x06 \x01(\x0b\x32\x31.google.cloud.webrisk.v1beta1.ThreatEntryRemovals\x12\x19\n\x11new_version_token\x18\x07 \x01(\x0c\x12V\n\x08\x63hecksum\x18\x08 \x01(\x0b\x32\x44.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum\x12\x39\n\x15recommended_next_diff\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1a\n\x08\x43hecksum\x12\x0e\n\x06sha256\x18\x01 \x01(\x0c\"B\n\x0cResponseType\x12\x1d\n\x19RESPONSE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44IFF\x10\x01\x12\t\n\x05RESET\x10\x02\"j\n\x11SearchUrisRequest\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x0cthreat_types\x18\x02 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatTypeB\x03\xe0\x41\x02\"\xde\x01\n\x12SearchUrisResponse\x12J\n\x06threat\x18\x01 \x01(\x0b\x32:.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri\x1a|\n\tThreatUri\x12>\n\x0cthreat_types\x18\x01 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatType\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"o\n\x13SearchHashesRequest\x12\x13\n\x0bhash_prefix\x18\x01 \x01(\x0c\x12\x43\n\x0cthreat_types\x18\x02 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatTypeB\x03\xe0\x41\x02\"\xae\x02\n\x14SearchHashesResponse\x12N\n\x07threats\x18\x01 \x03(\x0b\x32=.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash\x12\x38\n\x14negative_expire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x8b\x01\n\nThreatHash\x12>\n\x0cthreat_types\x18\x01 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatType\x12\x0c\n\x04hash\x18\x02 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x99\x01\n\x14ThreatEntryAdditions\x12;\n\nraw_hashes\x18\x01 \x03(\x0b\x32\'.google.cloud.webrisk.v1beta1.RawHashes\x12\x44\n\x0brice_hashes\x18\x02 \x01(\x0b\x32/.google.cloud.webrisk.v1beta1.RiceDeltaEncoding\"\x9b\x01\n\x13ThreatEntryRemovals\x12=\n\x0braw_indices\x18\x01 \x01(\x0b\x32(.google.cloud.webrisk.v1beta1.RawIndices\x12\x45\n\x0crice_indices\x18\x02 \x01(\x0b\x32/.google.cloud.webrisk.v1beta1.RiceDeltaEncoding\"\x1d\n\nRawIndices\x12\x0f\n\x07indices\x18\x01 \x03(\x05\"4\n\tRawHashes\x12\x13\n\x0bprefix_size\x18\x01 \x01(\x05\x12\x12\n\nraw_hashes\x18\x02 \x01(\x0c\"k\n\x11RiceDeltaEncoding\x12\x13\n\x0b\x66irst_value\x18\x01 \x01(\x03\x12\x16\n\x0erice_parameter\x18\x02 \x01(\x05\x12\x13\n\x0b\x65ntry_count\x18\x03 \x01(\x05\x12\x14\n\x0c\x65ncoded_data\x18\x04 \x01(\x0c*e\n\nThreatType\x12\x1b\n\x17THREAT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MALWARE\x10\x01\x12\x16\n\x12SOCIAL_ENGINEERING\x10\x02\x12\x15\n\x11UNWANTED_SOFTWARE\x10\x03*F\n\x0f\x43ompressionType\x12 \n\x1c\x43OMPRESSION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x08\n\x04RICE\x10\x02\x32\x9e\x05\n\x15WebRiskServiceV1Beta1\x12\xe2\x01\n\x15\x43omputeThreatListDiff\x12:.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest\x1a;.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse\"P\xda\x41%threat_type,version_token,constraints\x82\xd3\xe4\x93\x02\"\x12 /v1beta1/threatLists:computeDiff\x12\xa0\x01\n\nSearchUris\x12/.google.cloud.webrisk.v1beta1.SearchUrisRequest\x1a\x30.google.cloud.webrisk.v1beta1.SearchUrisResponse\"/\xda\x41\x10uri,threat_types\x82\xd3\xe4\x93\x02\x16\x12\x14/v1beta1/uris:search\x12\xb0\x01\n\x0cSearchHashes\x12\x31.google.cloud.webrisk.v1beta1.SearchHashesRequest\x1a\x32.google.cloud.webrisk.v1beta1.SearchHashesResponse\"9\xda\x41\x18hash_prefix,threat_types\x82\xd3\xe4\x93\x02\x18\x12\x16/v1beta1/hashes:search\x1aJ\xca\x41\x16webrisk.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xcf\x01\n\x1a\x63om.google.webrisk.v1beta1B\x0cWebRiskProtoP\x01Z:cloud.google.com/go/webrisk/apiv1beta1/webriskpb;webriskpb\xa2\x02\x04GCWR\xaa\x02\x1cGoogle.Cloud.WebRisk.V1Beta1\xca\x02\x1cGoogle\\Cloud\\WebRisk\\V1beta1\xea\x02\x1fGoogle::Cloud::WebRisk::V1beta1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebRisk + module V1beta1 + ComputeThreatListDiffRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest").msgclass + ComputeThreatListDiffRequest::Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints").msgclass + ComputeThreatListDiffResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse").msgclass + ComputeThreatListDiffResponse::Checksum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum").msgclass + ComputeThreatListDiffResponse::ResponseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType").enummodule + SearchUrisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchUrisRequest").msgclass + SearchUrisResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchUrisResponse").msgclass + SearchUrisResponse::ThreatUri = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri").msgclass + SearchHashesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchHashesRequest").msgclass + SearchHashesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchHashesResponse").msgclass + SearchHashesResponse::ThreatHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash").msgclass + ThreatEntryAdditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ThreatEntryAdditions").msgclass + ThreatEntryRemovals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ThreatEntryRemovals").msgclass + RawIndices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.RawIndices").msgclass + RawHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.RawHashes").msgclass + RiceDeltaEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.RiceDeltaEncoding").msgclass + ThreatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ThreatType").enummodule + CompressionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.CompressionType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_services_pb.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_services_pb.rb new file mode 100644 index 000000000000..660324d80adb --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_services_pb.rb @@ -0,0 +1,55 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/webrisk/v1beta1/webrisk.proto for package 'Google.Cloud.WebRisk.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/webrisk/v1beta1/webrisk_pb' + +module Google + module Cloud + module WebRisk + module V1beta1 + module WebRiskServiceV1Beta1 + # Web Risk v1beta1 API defines an interface to detect malicious URLs on your + # website and in client applications. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1' + + # Gets the most recent threat list diffs. + rpc :ComputeThreatListDiff, ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse + # This method is used to check whether a URI is on a given threatList. + rpc :SearchUris, ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, ::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse + # Gets the full hashes that match the requested hash prefix. + # This is used after a hash prefix is looked up in a threatList + # and there is a match. The client side threatList only holds partial hashes + # so the client must query this method to determine if there is a full + # hash match of a threat. + rpc :SearchHashes, ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, ::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/README.md new file mode 100644 index 000000000000..a908c3711de1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Web Risk 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-web_risk-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/proto_docs/google/cloud/webrisk/v1beta1/webrisk.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/cloud/webrisk/v1beta1/webrisk.rb new file mode 100644 index 000000000000..c8e4013b59f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/cloud/webrisk/v1beta1/webrisk.rb @@ -0,0 +1,307 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebRisk + module V1beta1 + # Describes an API diff request. + # @!attribute [rw] threat_type + # @return [::Google::Cloud::WebRisk::V1beta1::ThreatType] + # The ThreatList to update. + # @!attribute [rw] version_token + # @return [::String] + # The current version token of the client for the requested list (the + # client version that was received from the last successful diff). + # @!attribute [rw] constraints + # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints] + # Required. The constraints associated with this request. + class ComputeThreatListDiffRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The constraints for this diff. + # @!attribute [rw] max_diff_entries + # @return [::Integer] + # The maximum size in number of entries. The diff will not contain more + # entries than this value. This should be a power of 2 between 2**10 and + # 2**20. If zero, no diff size limit is set. + # @!attribute [rw] max_database_entries + # @return [::Integer] + # Sets the maximum number of entries that the client is willing to have + # in the local database. This should be a power of 2 between 2**10 and + # 2**20. If zero, no database size limit is set. + # @!attribute [rw] supported_compressions + # @return [::Array<::Google::Cloud::WebRisk::V1beta1::CompressionType>] + # The compression types supported by the client. + class Constraints + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] response_type + # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::ResponseType] + # The type of response. This may indicate that an action must be taken by the + # client when the response is received. + # @!attribute [rw] additions + # @return [::Google::Cloud::WebRisk::V1beta1::ThreatEntryAdditions] + # A set of entries to add to a local threat type's list. + # @!attribute [rw] removals + # @return [::Google::Cloud::WebRisk::V1beta1::ThreatEntryRemovals] + # A set of entries to remove from a local threat type's list. + # This field may be empty. + # @!attribute [rw] new_version_token + # @return [::String] + # The new opaque client version token. + # @!attribute [rw] checksum + # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::Checksum] + # The expected SHA256 hash of the client state; that is, of the sorted list + # of all hashes present in the database after applying the provided diff. + # If the client state doesn't match the expected state, the client must + # disregard this diff and retry later. + # @!attribute [rw] recommended_next_diff + # @return [::Google::Protobuf::Timestamp] + # The soonest the client should wait before issuing any diff + # request. Querying sooner is unlikely to produce a meaningful diff. + # Waiting longer is acceptable considering the use case. + # If this field is not set clients may update as soon as they want. + class ComputeThreatListDiffResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The expected state of a client's local database. + # @!attribute [rw] sha256 + # @return [::String] + # The SHA256 hash of the client state; that is, of the sorted list of all + # hashes present in the database. + class Checksum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of response sent to the client. + module ResponseType + # Unknown. + RESPONSE_TYPE_UNSPECIFIED = 0 + + # Partial updates are applied to the client's existing local database. + DIFF = 1 + + # Full updates resets the client's entire local database. This means + # that either the client had no state, was seriously out-of-date, + # or the client is believed to be corrupt. + RESET = 2 + end + end + + # Request to check URI entries against threatLists. + # @!attribute [rw] uri + # @return [::String] + # Required. The URI to be checked for matches. + # @!attribute [rw] threat_types + # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] + # Required. The ThreatLists to search in. + class SearchUrisRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] threat + # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse::ThreatUri] + # The threat list matches. This may be empty if the URI is on no list. + class SearchUrisResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains threat information on a matching uri. + # @!attribute [rw] threat_types + # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] + # The ThreatList this threat belongs to. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # The cache lifetime for the returned match. Clients must not cache this + # response past this timestamp to avoid false positives. + class ThreatUri + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request to return full hashes matched by the provided hash prefixes. + # @!attribute [rw] hash_prefix + # @return [::String] + # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 + # hash. For JSON requests, this field is base64-encoded. + # @!attribute [rw] threat_types + # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] + # Required. The ThreatLists to search in. + class SearchHashesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] threats + # @return [::Array<::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse::ThreatHash>] + # The full hashes that matched the requested prefixes. + # The hash will be populated in the key. + # @!attribute [rw] negative_expire_time + # @return [::Google::Protobuf::Timestamp] + # For requested entities that did not match the threat list, how long to + # cache the response until. + class SearchHashesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains threat information on a matching hash. + # @!attribute [rw] threat_types + # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] + # The ThreatList this threat belongs to. + # This must contain at least one entry. + # @!attribute [rw] hash + # @return [::String] + # A 32 byte SHA256 hash. This field is in binary format. For JSON + # requests, hashes are base64-encoded. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # The cache lifetime for the returned match. Clients must not cache this + # response past this timestamp to avoid false positives. + class ThreatHash + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Contains the set of entries to add to a local database. + # May contain a combination of compressed and raw data in a single response. + # @!attribute [rw] raw_hashes + # @return [::Array<::Google::Cloud::WebRisk::V1beta1::RawHashes>] + # The raw SHA256-formatted entries. + # Repeated to allow returning sets of hashes with different prefix sizes. + # @!attribute [rw] rice_hashes + # @return [::Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding] + # The encoded 4-byte prefixes of SHA256-formatted entries, using a + # Golomb-Rice encoding. The hashes are converted to uint32, sorted in + # ascending order, then delta encoded and stored as encoded_data. + class ThreatEntryAdditions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains the set of entries to remove from a local database. + # @!attribute [rw] raw_indices + # @return [::Google::Cloud::WebRisk::V1beta1::RawIndices] + # The raw removal indices for a local list. + # @!attribute [rw] rice_indices + # @return [::Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding] + # The encoded local, lexicographically-sorted list indices, using a + # Golomb-Rice encoding. Used for sending compressed removal indices. The + # removal indices (uint32) are sorted in ascending order, then delta encoded + # and stored as encoded_data. + class ThreatEntryRemovals + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of raw indices to remove from a local list. + # @!attribute [rw] indices + # @return [::Array<::Integer>] + # The indices to remove from a lexicographically-sorted local list. + class RawIndices + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The uncompressed threat entries in hash format. + # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 + # bytes, but some hashes are lengthened if they collide with the hash of a + # popular URI. + # + # Used for sending ThreatEntryAdditons to clients that do not support + # compression, or when sending non-4-byte hashes to clients that do support + # compression. + # @!attribute [rw] prefix_size + # @return [::Integer] + # The number of bytes for each prefix encoded below. This field can be + # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). + # @!attribute [rw] raw_hashes + # @return [::String] + # The hashes, in binary format, concatenated into one long string. Hashes are + # sorted in lexicographic order. For JSON API users, hashes are + # base64-encoded. + class RawHashes + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or + # compressed removal indices. + # @!attribute [rw] first_value + # @return [::Integer] + # The offset of the first entry in the encoded data, or, if only a single + # integer was encoded, that single integer's value. If the field is empty or + # missing, assume zero. + # @!attribute [rw] rice_parameter + # @return [::Integer] + # The Golomb-Rice parameter, which is a number between 2 and 28. This field + # is missing (that is, zero) if `num_entries` is zero. + # @!attribute [rw] entry_count + # @return [::Integer] + # The number of entries that are delta encoded in the encoded data. If only a + # single integer was encoded, this will be zero and the single value will be + # stored in `first_value`. + # @!attribute [rw] encoded_data + # @return [::String] + # The encoded deltas that are encoded using the Golomb-Rice coder. + class RiceDeltaEncoding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of threat. This maps dirrectly to the threat list a threat may + # belong to. + module ThreatType + # Unknown. + THREAT_TYPE_UNSPECIFIED = 0 + + # Malware targeting any platform. + MALWARE = 1 + + # Social engineering targeting any platform. + SOCIAL_ENGINEERING = 2 + + # Unwanted software targeting any platform. + UNWANTED_SOFTWARE = 3 + end + + # The ways in which threat entry sets can be compressed. + module CompressionType + # Unknown. + COMPRESSION_TYPE_UNSPECIFIED = 0 + + # Raw, uncompressed data. + RAW = 1 + + # Rice-Golomb encoded data. + RICE = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/Gemfile new file mode 100644 index 000000000000..9e1e8937a0c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1", path: "../" +else + gem "google-cloud-web_risk-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-web_risk-v1beta1/snippets/snippet_metadata_google.cloud.webrisk.v1beta1.json b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/snippet_metadata_google.cloud.webrisk.v1beta1.json new file mode 100644 index 000000000000..5fc454a190f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/snippet_metadata_google.cloud.webrisk.v1beta1.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-cloud-web_risk-v1beta1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.webrisk.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "region_tag": "webrisk_v1beta1_generated_WebRiskService_ComputeThreatListDiff_sync", + "title": "Snippet for the compute_threat_list_diff call in the WebRiskService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#compute_threat_list_diff.", + "file": "web_risk_service/compute_threat_list_diff.rb", + "language": "RUBY", + "client_method": { + "short_name": "compute_threat_list_diff", + "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#compute_threat_list_diff", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse", + "client": { + "short_name": "WebRiskService::Client", + "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client" + }, + "method": { + "short_name": "ComputeThreatListDiff", + "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.ComputeThreatListDiff", + "service": { + "short_name": "WebRiskService", + "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "webrisk_v1beta1_generated_WebRiskService_SearchUris_sync", + "title": "Snippet for the search_uris call in the WebRiskService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_uris.", + "file": "web_risk_service/search_uris.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_uris", + "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_uris", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse", + "client": { + "short_name": "WebRiskService::Client", + "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client" + }, + "method": { + "short_name": "SearchUris", + "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchUris", + "service": { + "short_name": "WebRiskService", + "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "webrisk_v1beta1_generated_WebRiskService_SearchHashes_sync", + "title": "Snippet for the search_hashes call in the WebRiskService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_hashes.", + "file": "web_risk_service/search_hashes.rb", + "language": "RUBY", + "client_method": { + "short_name": "search_hashes", + "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_hashes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse", + "client": { + "short_name": "WebRiskService::Client", + "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client" + }, + "method": { + "short_name": "SearchHashes", + "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchHashes", + "service": { + "short_name": "WebRiskService", + "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1" + } + } + }, + "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-web_risk-v1beta1/snippets/web_risk_service/compute_threat_list_diff.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/compute_threat_list_diff.rb new file mode 100644 index 000000000000..317d12f0e694 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/compute_threat_list_diff.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START webrisk_v1beta1_generated_WebRiskService_ComputeThreatListDiff_sync] +require "google/cloud/web_risk/v1beta1" + +## +# Snippet for the compute_threat_list_diff call in the WebRiskService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#compute_threat_list_diff. +# +def compute_threat_list_diff + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new + + # Call the compute_threat_list_diff method. + result = client.compute_threat_list_diff request + + # The returned object is of type Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse. + p result +end +# [END webrisk_v1beta1_generated_WebRiskService_ComputeThreatListDiff_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_hashes.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_hashes.rb new file mode 100644 index 000000000000..49e9992e8e2a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_hashes.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START webrisk_v1beta1_generated_WebRiskService_SearchHashes_sync] +require "google/cloud/web_risk/v1beta1" + +## +# Snippet for the search_hashes call in the WebRiskService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_hashes. +# +def search_hashes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new + + # Call the search_hashes method. + result = client.search_hashes request + + # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchHashesResponse. + p result +end +# [END webrisk_v1beta1_generated_WebRiskService_SearchHashes_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_uris.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_uris.rb new file mode 100644 index 000000000000..096ea0fa663b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_uris.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START webrisk_v1beta1_generated_WebRiskService_SearchUris_sync] +require "google/cloud/web_risk/v1beta1" + +## +# Snippet for the search_uris call in the WebRiskService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_uris. +# +def search_uris + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new + + # Call the search_uris method. + result = client.search_uris request + + # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchUrisResponse. + p result +end +# [END webrisk_v1beta1_generated_WebRiskService_SearchUris_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_rest_test.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_rest_test.rb new file mode 100644 index 000000000000..7c9f01b165dd --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_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/webrisk/v1beta1/webrisk_pb" +require "google/cloud/web_risk/v1beta1/web_risk_service/rest" + + +class ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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_compute_threat_list_diff + # Create test objects. + client_result = ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + threat_type = :THREAT_TYPE_UNSPECIFIED + version_token = "hello world" + constraints = {} + + compute_threat_list_diff_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::ServiceStub.stub :transcode_compute_threat_list_diff_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, compute_threat_list_diff_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.compute_threat_list_diff threat_type: threat_type, version_token: version_token, constraints: constraints do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.compute_threat_list_diff ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.compute_threat_list_diff(::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, compute_threat_list_diff_client_stub.call_count + end + end + end + + def test_search_uris + # Create test objects. + client_result = ::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + uri = "hello world" + threat_types = [:THREAT_TYPE_UNSPECIFIED] + + search_uris_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::ServiceStub.stub :transcode_search_uris_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_uris_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_uris({ uri: uri, threat_types: threat_types }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_uris uri: uri, threat_types: threat_types do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_uris ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new(uri: uri, threat_types: threat_types) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_uris({ uri: uri, threat_types: threat_types }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_uris(::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new(uri: uri, threat_types: threat_types), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_uris_client_stub.call_count + end + end + end + + def test_search_hashes + # Create test objects. + client_result = ::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + hash_prefix = "hello world" + threat_types = [:THREAT_TYPE_UNSPECIFIED] + + search_hashes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::ServiceStub.stub :transcode_search_hashes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, search_hashes_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.search_hashes hash_prefix: hash_prefix, threat_types: threat_types do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.search_hashes ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.search_hashes(::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, search_hashes_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::WebRisk::V1beta1::WebRiskService::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::WebRisk::V1beta1::WebRiskService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_test.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_test.rb new file mode 100644 index 000000000000..51da0e186f5b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_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/cloud/webrisk/v1beta1/webrisk_pb" +require "google/cloud/web_risk/v1beta1/web_risk_service" + +class ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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_compute_threat_list_diff + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + threat_type = :THREAT_TYPE_UNSPECIFIED + version_token = "hello world" + constraints = {} + + compute_threat_list_diff_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :compute_threat_list_diff, name + assert_kind_of ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, request + assert_equal :THREAT_TYPE_UNSPECIFIED, request["threat_type"] + assert_equal "hello world", request["version_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints), request["constraints"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, compute_threat_list_diff_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.compute_threat_list_diff threat_type: threat_type, version_token: version_token, constraints: constraints do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.compute_threat_list_diff ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.compute_threat_list_diff(::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, compute_threat_list_diff_client_stub.call_rpc_count + end + end + + def test_search_uris + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + uri = "hello world" + threat_types = [:THREAT_TYPE_UNSPECIFIED] + + search_uris_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_uris, name + assert_kind_of ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, request + assert_equal "hello world", request["uri"] + assert_equal [:THREAT_TYPE_UNSPECIFIED], request["threat_types"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_uris_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_uris({ uri: uri, threat_types: threat_types }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_uris uri: uri, threat_types: threat_types do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_uris ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new(uri: uri, threat_types: threat_types) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_uris({ uri: uri, threat_types: threat_types }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_uris(::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new(uri: uri, threat_types: threat_types), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_uris_client_stub.call_rpc_count + end + end + + def test_search_hashes + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + hash_prefix = "hello world" + threat_types = [:THREAT_TYPE_UNSPECIFIED] + + search_hashes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :search_hashes, name + assert_kind_of ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, request + assert_equal "hello world", request["hash_prefix"] + assert_equal [:THREAT_TYPE_UNSPECIFIED], request["threat_types"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, search_hashes_client_stub do + # Create client + client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.search_hashes hash_prefix: hash_prefix, threat_types: threat_types do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.search_hashes ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.search_hashes(::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, search_hashes_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::WebRisk::V1beta1::WebRiskService::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::WebRisk::V1beta1::WebRiskService::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::WebRisk::V1beta1::WebRiskService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk-v1beta1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_risk/.gitignore b/owl-bot-staging/google-cloud-web_risk/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-web_risk/.repo-metadata.json b/owl-bot-staging/google-cloud-web_risk/.repo-metadata.json new file mode 100644 index 000000000000..d5eced76f00c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "webrisk.googleapis.com", + "api_shortname": "webrisk", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk/latest", + "distribution_name": "google-cloud-web_risk", + "is_cloud": true, + "language": "ruby", + "name": "webrisk", + "name_pretty": "Web Risk API", + "product_documentation": "https://cloud.google.com/web-risk", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources.", + "ruby-cloud-env-prefix": "WEBRISK", + "ruby-cloud-product-url": "https://cloud.google.com/web-risk", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-web_risk/.rubocop.yml b/owl-bot-staging/google-cloud-web_risk/.rubocop.yml new file mode 100644 index 000000000000..636c866d7d05 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-web_risk.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-cloud-web_risk.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-web_risk/.toys.rb b/owl-bot-staging/google-cloud-web_risk/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/.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-web_risk/.yardopts b/owl-bot-staging/google-cloud-web_risk/.yardopts new file mode 100644 index 000000000000..3da3d7a2bcef --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Web Risk API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-web_risk/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_risk/AUTHENTICATION.md new file mode 100644 index 000000000000..74419dfaba23 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-web_risk 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-web_risk 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/web_risk" + +client = Google::Cloud::WebRisk.web_risk_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/web_risk" + +Google::Cloud::WebRisk.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::WebRisk.web_risk_service +``` + +### Environment Variables + +You can also use an environment variable to provide a JSON credentials file. +The environment variable can contain a path to the credentials file or, for +environments such as Docker containers where writing files is not encouraged, +you can include the credentials file itself. + +The JSON file can contain credentials created for +[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), +[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a +[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). + +Note: Service account keys are a security risk if not managed correctly. You should +[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) +whenever possible. + +The environment variables that google-cloud-web_risk +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/web_risk" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::WebRisk.web_risk_service +``` + +### Local ADC file + +You can set up a local ADC file with your user credentials for authentication during +development. If credentials are not provided in code or in environment variables, +then the local ADC credentials are discovered. + +Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. + +### Google Cloud Platform environments + +When running on Google Cloud Platform (GCP), including Google Compute Engine +(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud +Functions (GCF) and Cloud Run, credentials are retrieved from the attached +service account automatically. Code should be written as if already authenticated. + +For more information, see +[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-web_risk/CHANGELOG.md b/owl-bot-staging/google-cloud-web_risk/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-web_risk/Gemfile b/owl-bot-staging/google-cloud-web_risk/Gemfile new file mode 100644 index 000000000000..07fc9c47d630 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-web_risk-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-web_risk.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_risk/LICENSE.md b/owl-bot-staging/google-cloud-web_risk/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/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-web_risk/README.md b/owl-bot-staging/google-cloud-web_risk/README.md new file mode 100644 index 000000000000..cc79f845f222 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Web Risk API + +API Client library for the Web Risk API + +Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-web_risk-v*`. +The gem `google-cloud-web_risk` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk/latest) +for this library, google-cloud-web_risk, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-web_risk-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/web-risk) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-web_risk +``` + +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/webrisk.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/web_risk" + +client = Google::Cloud::WebRisk.web_risk_service +request = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new # (request fields as keyword arguments...) +response = client.compute_threat_list_diff request +``` + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-web_risk-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-web_risk`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-web_risk-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-web_risk`. +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-web_risk-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-web_risk/Rakefile b/owl-bot-staging/google-cloud-web_risk/Rakefile new file mode 100644 index 000000000000..aa92a55510f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-web_risk acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WEBRISK_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WEBRISK_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WEBRISK_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 WEBRISK_TEST_PROJECT=test123 WEBRISK_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/web_risk/v1/web_risk_service/credentials" + ::Google::Cloud::WebRisk::V1::WebRiskService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WEBRISK_PROJECT"] = project + ENV["WEBRISK_TEST_PROJECT"] = project + ENV["WEBRISK_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-web_risk 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-web_risk 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-web_risk 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-web_risk gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-web_risk" + header "google-cloud-web_risk rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-web_risk yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-web_risk 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-web_risk 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-web_risk 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-web_risk/google-cloud-web_risk.gemspec b/owl-bot-staging/google-cloud-web_risk/google-cloud-web_risk.gemspec new file mode 100644 index 000000000000..9601bd3a78d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/google-cloud-web_risk.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/web_risk/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-web_risk" + gem.version = Google::Cloud::WebRisk::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources." + gem.summary = "API Client library for the Web Risk API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-web_risk-v1", "~> 1.2" +end diff --git a/owl-bot-staging/google-cloud-web_risk/lib/google-cloud-web_risk.rb b/owl-bot-staging/google-cloud-web_risk/lib/google-cloud-web_risk.rb new file mode 100644 index 000000000000..46ec1430a2e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/lib/google-cloud-web_risk.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/web_risk" unless defined? Google::Cloud::WebRisk::VERSION diff --git a/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk.rb b/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk.rb new file mode 100644 index 000000000000..03ef36009241 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/web_risk/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :web_risk do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module WebRisk + ## + # Create a new client object for WebRiskService. + # + # By default, this returns an instance of + # [Google::Cloud::WebRisk::V1::WebRiskService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest/Google-Cloud-WebRisk-V1-WebRiskService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the WebRiskService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the WebRiskService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::WebRisk.web_risk_service_available?}. + # + # ## About WebRiskService + # + # Web Risk API defines an interface to detect malicious URLs on your + # website and in client applications. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.web_risk_service version: :v1, transport: :grpc, &block + require "google/cloud/web_risk/#{version.to_s.downcase}" + + package_name = Google::Cloud::WebRisk + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::WebRisk.const_get(package_name).const_get(:WebRiskService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the WebRiskService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::WebRisk.web_risk_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the WebRiskService service, + # or if the versioned client gem needs an update to support the WebRiskService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.web_risk_service_available? version: :v1, transport: :grpc + require "google/cloud/web_risk/#{version.to_s.downcase}" + package_name = Google::Cloud::WebRisk + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::WebRisk.const_get package_name + return false unless service_module.const_defined? :WebRiskService + service_module = service_module.const_get :WebRiskService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-web_risk library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.web_risk if block_given? + + ::Google::Cloud.configure.web_risk + end + end + end +end + +helper_path = ::File.join __dir__, "web_risk", "helpers.rb" +require "google/cloud/web_risk/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb b/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb new file mode 100644 index 000000000000..a05c8a144a4f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebRisk + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/client_test.rb b/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/client_test.rb new file mode 100644 index 000000000000..3764e7e77b26 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/web_risk" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::WebRisk::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_web_risk_service_grpc + skip unless Google::Cloud::WebRisk.web_risk_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::WebRisk.web_risk_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::WebRisk::V1::WebRiskService::Client, client + end + end + + def test_web_risk_service_rest + skip unless Google::Cloud::WebRisk.web_risk_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::WebRisk.web_risk_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/version_test.rb b/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/version_test.rb new file mode 100644 index 000000000000..0e91a1b88efb --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/web_risk/version" + +class Google::Cloud::WebRisk::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::WebRisk::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-web_risk/test/helper.rb b/owl-bot-staging/google-cloud-web_risk/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_risk/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/.gitignore b/owl-bot-staging/google-cloud-web_security_scanner-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-web_security_scanner-v1/.repo-metadata.json new file mode 100644 index 000000000000..ff1da57a74a2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "websecurityscanner.googleapis.com", + "api_shortname": "websecurityscanner", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest", + "distribution_name": "google-cloud-web_security_scanner-v1", + "is_cloud": true, + "language": "ruby", + "name": "websecurityscanner", + "name_pretty": "Web Security Scanner V1 API", + "product_documentation": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. Note that google-cloud-web_security_scanner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_security_scanner instead. See the readme for more details.", + "ruby-cloud-env-prefix": "WEB_SECURITY_SCANNER", + "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/.rubocop.yml b/owl-bot-staging/google-cloud-web_security_scanner-v1/.rubocop.yml new file mode 100644 index 000000000000..d1aa57a60d61 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-web_security_scanner-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-web_security_scanner-v1.rb" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/.toys.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/.yardopts b/owl-bot-staging/google-cloud-web_security_scanner-v1/.yardopts new file mode 100644 index 000000000000..826dfac587d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Web Security Scanner 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-web_security_scanner-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_security_scanner-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..840d2d274ade --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-web_security_scanner-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-web_security_scanner-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/web_security_scanner/v1" + +client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/web_security_scanner/v1" + +::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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-web_security_scanner-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/web_security_scanner/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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-web_security_scanner-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-web_security_scanner-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/LICENSE.md b/owl-bot-staging/google-cloud-web_security_scanner-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/README.md b/owl-bot-staging/google-cloud-web_security_scanner-v1/README.md new file mode 100644 index 000000000000..58219b923452 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Web Security Scanner V1 API + +Scans your Compute and App Engine apps for common web vulnerabilities. + +Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Web Security Scanner V1 API. Most users should consider using +the main client gem, +[google-cloud-web_security_scanner](https://rubygems.org/gems/google-cloud-web_security_scanner). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-web_security_scanner-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/websecurityscanner.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/web_security_scanner/v1" + +client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new +request = ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new # (request fields as keyword arguments...) +response = client.create_scan_config request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-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/web_security_scanner/v1" +require "logger" + +client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-web_security_scanner`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-web_security_scanner-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-web_security_scanner`. +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-web_security_scanner-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-web_security_scanner-v1/Rakefile b/owl-bot-staging/google-cloud-web_security_scanner-v1/Rakefile new file mode 100644 index 000000000000..4216b0dd6f74 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WEB_SECURITY_SCANNER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WEB_SECURITY_SCANNER_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 WEB_SECURITY_SCANNER_TEST_PROJECT=test123 WEB_SECURITY_SCANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials" + ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WEB_SECURITY_SCANNER_PROJECT"] = project + ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] = project + ENV["WEB_SECURITY_SCANNER_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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-web_security_scanner-v1" + header "google-cloud-web_security_scanner-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-web_security_scanner-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-web_security_scanner-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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-web_security_scanner-v1/gapic_metadata.json new file mode 100644 index 000000000000..bc19a64a2036 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/gapic_metadata.json @@ -0,0 +1,83 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.websecurityscanner.v1", + "libraryPackage": "::Google::Cloud::WebSecurityScanner::V1", + "services": { + "WebSecurityScanner": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client", + "rpcs": { + "CreateScanConfig": { + "methods": [ + "create_scan_config" + ] + }, + "DeleteScanConfig": { + "methods": [ + "delete_scan_config" + ] + }, + "GetScanConfig": { + "methods": [ + "get_scan_config" + ] + }, + "ListScanConfigs": { + "methods": [ + "list_scan_configs" + ] + }, + "UpdateScanConfig": { + "methods": [ + "update_scan_config" + ] + }, + "StartScanRun": { + "methods": [ + "start_scan_run" + ] + }, + "GetScanRun": { + "methods": [ + "get_scan_run" + ] + }, + "ListScanRuns": { + "methods": [ + "list_scan_runs" + ] + }, + "StopScanRun": { + "methods": [ + "stop_scan_run" + ] + }, + "ListCrawledUrls": { + "methods": [ + "list_crawled_urls" + ] + }, + "GetFinding": { + "methods": [ + "get_finding" + ] + }, + "ListFindings": { + "methods": [ + "list_findings" + ] + }, + "ListFindingTypeStats": { + "methods": [ + "list_finding_type_stats" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/google-cloud-web_security_scanner-v1.gemspec b/owl-bot-staging/google-cloud-web_security_scanner-v1/google-cloud-web_security_scanner-v1.gemspec new file mode 100644 index 000000000000..e21b5930236d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/google-cloud-web_security_scanner-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/web_security_scanner/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-web_security_scanner-v1" + gem.version = Google::Cloud::WebSecurityScanner::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. Note that google-cloud-web_security_scanner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_security_scanner instead. See the readme for more details." + gem.summary = "Scans your Compute and App Engine apps for common web vulnerabilities." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google-cloud-web_security_scanner-v1.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google-cloud-web_security_scanner-v1.rb new file mode 100644 index 000000000000..364764ba9da8 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google-cloud-web_security_scanner-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/web_security_scanner/v1" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1.rb new file mode 100644 index 000000000000..4ddf0087078f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/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/web_security_scanner/v1/web_security_scanner" +require "google/cloud/web_security_scanner/v1/version" + +module Google + module Cloud + module WebSecurityScanner + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/web_security_scanner/v1" + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/web_security_scanner/v1" + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/web_security_scanner/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/rest.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/rest.rb new file mode 100644 index 000000000000..7b9965314561 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/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/web_security_scanner/v1/web_security_scanner/rest" +require "google/cloud/web_security_scanner/v1/version" + +module Google + module Cloud + module WebSecurityScanner + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/web_security_scanner/v1/rest" + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/version.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/version.rb new file mode 100644 index 000000000000..d7cb02f682fa --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/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 WebSecurityScanner + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner.rb new file mode 100644 index 000000000000..2f4a9b948057 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner.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/web_security_scanner/v1/version" + +require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials" +require "google/cloud/web_security_scanner/v1/web_security_scanner/client" +require "google/cloud/web_security_scanner/v1/web_security_scanner/rest" + +module Google + module Cloud + module WebSecurityScanner + module V1 + ## + # Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/web_security_scanner/v1/web_security_scanner" + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/web_security_scanner/v1/web_security_scanner/rest" + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + module WebSecurityScanner + end + end + end + end +end + +helper_path = ::File.join __dir__, "web_security_scanner", "helpers.rb" +require "google/cloud/web_security_scanner/v1/web_security_scanner/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/client.rb new file mode 100644 index 000000000000..ff36744057f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/client.rb @@ -0,0 +1,1719 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/websecurityscanner/v1/web_security_scanner_pb" + +module Google + module Cloud + module WebSecurityScanner + module V1 + module WebSecurityScanner + ## + # Client for the WebSecurityScanner service. + # + # Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "websecurityscanner.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :web_security_scanner_stub + + ## + # Configure the WebSecurityScanner Client class. + # + # See {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WebSecurityScanner clients + # ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "WebSecurityScanner", "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_scan_config.timeout = 600.0 + + default_config.rpcs.delete_scan_config.timeout = 600.0 + default_config.rpcs.delete_scan_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_scan_config.timeout = 600.0 + default_config.rpcs.get_scan_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_scan_configs.timeout = 600.0 + default_config.rpcs.list_scan_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_scan_config.timeout = 600.0 + + default_config.rpcs.start_scan_run.timeout = 600.0 + + default_config.rpcs.get_scan_run.timeout = 600.0 + default_config.rpcs.get_scan_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_scan_runs.timeout = 600.0 + default_config.rpcs.list_scan_runs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.stop_scan_run.timeout = 600.0 + + default_config.rpcs.list_crawled_urls.timeout = 600.0 + default_config.rpcs.list_crawled_urls.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_finding.timeout = 600.0 + default_config.rpcs.get_finding.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 600.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_finding_type_stats.timeout = 600.0 + default_config.rpcs.list_finding_type_stats.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 WebSecurityScanner Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @web_security_scanner_stub.universe_domain + end + + ## + # Create a new WebSecurityScanner client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WebSecurityScanner 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/websecurityscanner/v1/web_security_scanner_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 + + @web_security_scanner_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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 + ) + + @web_security_scanner_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 + @web_security_scanner_stub.logger + end + + # Service calls + + ## + # Creates a new ScanConfig. + # + # @overload create_scan_config(request, options = nil) + # Pass arguments to `create_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_scan_config(parent: nil, scan_config: nil) + # Pass arguments to `create_scan_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name where the scan is created, which should be a + # project resource name in the format 'projects/\\{projectId}'. + # @param scan_config [::Google::Cloud::WebSecurityScanner::V1::ScanConfig, ::Hash] + # Required. The ScanConfig to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new + # + # # Call the create_scan_config method. + # result = client.create_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. + # p result + # + def create_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_scan_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::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_scan_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :create_scan_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing ScanConfig and its child resources. + # + # @overload delete_scan_config(request, options = nil) + # Pass arguments to `delete_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_scan_config(name: nil) + # Pass arguments to `delete_scan_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 resource name of the ScanConfig to be deleted. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new + # + # # Call the delete_scan_config method. + # result = client.delete_scan_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_scan_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::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_scan_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :delete_scan_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ScanConfig. + # + # @overload get_scan_config(request, options = nil) + # Pass arguments to `get_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_scan_config(name: nil) + # Pass arguments to `get_scan_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 resource name of the ScanConfig to be returned. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new + # + # # Call the get_scan_config method. + # result = client.get_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. + # p result + # + def get_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_scan_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::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_scan_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :get_scan_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists ScanConfigs under a given project. + # + # @overload list_scan_configs(request, options = nil) + # Pass arguments to `list_scan_configs` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_scan_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_scan_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, which should be a project resource name in the + # format 'projects/\\{projectId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of ScanConfigs to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new + # + # # Call the list_scan_configs method. + # result = client.list_scan_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::WebSecurityScanner::V1::ScanConfig. + # p item + # end + # + def list_scan_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_scan_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::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_scan_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scan_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_scan_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a ScanConfig. This method support partial update of a ScanConfig. + # + # @overload update_scan_config(request, options = nil) + # Pass arguments to `update_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_scan_config(scan_config: nil, update_mask: nil) + # Pass arguments to `update_scan_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 scan_config [::Google::Cloud::WebSecurityScanner::V1::ScanConfig, ::Hash] + # Required. The ScanConfig to be updated. The name field must be set to identify the + # resource to be updated. The values of fields not covered by the mask + # will be ignored. + # @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::WebSecurityScanner::V1::ScanConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new + # + # # Call the update_scan_config method. + # result = client.update_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. + # p result + # + def update_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_scan_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::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.scan_config&.name + header_params["scan_config.name"] = request.scan_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_scan_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :update_scan_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 + + ## + # Start a ScanRun according to the given ScanConfig. + # + # @overload start_scan_run(request, options = nil) + # Pass arguments to `start_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scan_run(name: nil) + # Pass arguments to `start_scan_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 resource name of the ScanConfig to be used. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new + # + # # Call the start_scan_run method. + # result = client.start_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. + # p result + # + def start_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest + + # Converts hash and nil to 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_scan_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::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_scan_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :start_scan_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 + + ## + # Gets a ScanRun. + # + # @overload get_scan_run(request, options = nil) + # Pass arguments to `get_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_scan_run(name: nil) + # Pass arguments to `get_scan_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 resource name of the ScanRun to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new + # + # # Call the get_scan_run method. + # result = client.get_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. + # p result + # + def get_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_scan_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::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_scan_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :get_scan_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 + + ## + # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + # stop time. + # + # @overload list_scan_runs(request, options = nil) + # Pass arguments to `list_scan_runs` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_scan_runs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_scan_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. The parent resource name, which should be a scan resource name in the + # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of ScanRuns to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new + # + # # Call the list_scan_runs method. + # result = client.list_scan_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::WebSecurityScanner::V1::ScanRun. + # p item + # end + # + def list_scan_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_scan_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::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_scan_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scan_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_scan_runs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_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 + + ## + # Stops a ScanRun. The stopped ScanRun is returned. + # + # @overload stop_scan_run(request, options = nil) + # Pass arguments to `stop_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scan_run(name: nil) + # Pass arguments to `stop_scan_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 resource name of the ScanRun to be stopped. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new + # + # # Call the stop_scan_run method. + # result = client.stop_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. + # p result + # + def stop_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest + + # Converts hash and nil to 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_scan_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::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_scan_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stop_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :stop_scan_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 + + ## + # List CrawledUrls under a given ScanRun. + # + # @overload list_crawled_urls(request, options = nil) + # Pass arguments to `list_crawled_urls` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_crawled_urls(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_crawled_urls` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of CrawledUrls to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new + # + # # Call the list_crawled_urls method. + # result = client.list_crawled_urls request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::CrawledUrl. + # p item + # end + # + def list_crawled_urls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_crawled_urls.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_crawled_urls.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_crawled_urls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_crawled_urls, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, request, response, 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 Finding. + # + # @overload get_finding(request, options = nil) + # Pass arguments to `get_finding` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_finding(name: nil) + # Pass arguments to `get_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Finding to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new + # + # # Call the get_finding method. + # result = client.get_finding request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::Finding. + # p result + # + def get_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :get_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List Findings under a given ScanRun. + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @param filter [::String] + # The filter expression. The expression must be in the format: + # . + # Supported field: 'finding_type'. + # Supported operator: '='. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of Findings to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::Finding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::Finding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::Finding. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all FindingTypeStats under a given ScanRun. + # + # @overload list_finding_type_stats(request, options = nil) + # Pass arguments to `list_finding_type_stats` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_finding_type_stats(parent: nil) + # Pass arguments to `list_finding_type_stats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new + # + # # Call the list_finding_type_stats method. + # result = client.list_finding_type_stats request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse. + # p result + # + def list_finding_type_stats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_finding_type_stats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_finding_type_stats.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_finding_type_stats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_finding_type_stats, request, 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 WebSecurityScanner API. + # + # This class represents the configuration for WebSecurityScanner, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_scan_config to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_scan_config.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_scan_config.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "websecurityscanner.googleapis.com" + + config_attr :endpoint, nil, ::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 WebSecurityScanner API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scan_config + ## + # RPC-specific configuration for `delete_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scan_config + ## + # RPC-specific configuration for `get_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scan_config + ## + # RPC-specific configuration for `list_scan_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scan_configs + ## + # RPC-specific configuration for `update_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scan_config + ## + # RPC-specific configuration for `start_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :start_scan_run + ## + # RPC-specific configuration for `get_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scan_run + ## + # RPC-specific configuration for `list_scan_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scan_runs + ## + # RPC-specific configuration for `stop_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_scan_run + ## + # RPC-specific configuration for `list_crawled_urls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_crawled_urls + ## + # RPC-specific configuration for `get_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_finding + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_finding_type_stats` + # @return [::Gapic::Config::Method] + # + attr_reader :list_finding_type_stats + + # @private + def initialize parent_rpcs = nil + create_scan_config_config = parent_rpcs.create_scan_config if parent_rpcs.respond_to? :create_scan_config + @create_scan_config = ::Gapic::Config::Method.new create_scan_config_config + delete_scan_config_config = parent_rpcs.delete_scan_config if parent_rpcs.respond_to? :delete_scan_config + @delete_scan_config = ::Gapic::Config::Method.new delete_scan_config_config + get_scan_config_config = parent_rpcs.get_scan_config if parent_rpcs.respond_to? :get_scan_config + @get_scan_config = ::Gapic::Config::Method.new get_scan_config_config + list_scan_configs_config = parent_rpcs.list_scan_configs if parent_rpcs.respond_to? :list_scan_configs + @list_scan_configs = ::Gapic::Config::Method.new list_scan_configs_config + update_scan_config_config = parent_rpcs.update_scan_config if parent_rpcs.respond_to? :update_scan_config + @update_scan_config = ::Gapic::Config::Method.new update_scan_config_config + start_scan_run_config = parent_rpcs.start_scan_run if parent_rpcs.respond_to? :start_scan_run + @start_scan_run = ::Gapic::Config::Method.new start_scan_run_config + get_scan_run_config = parent_rpcs.get_scan_run if parent_rpcs.respond_to? :get_scan_run + @get_scan_run = ::Gapic::Config::Method.new get_scan_run_config + list_scan_runs_config = parent_rpcs.list_scan_runs if parent_rpcs.respond_to? :list_scan_runs + @list_scan_runs = ::Gapic::Config::Method.new list_scan_runs_config + stop_scan_run_config = parent_rpcs.stop_scan_run if parent_rpcs.respond_to? :stop_scan_run + @stop_scan_run = ::Gapic::Config::Method.new stop_scan_run_config + list_crawled_urls_config = parent_rpcs.list_crawled_urls if parent_rpcs.respond_to? :list_crawled_urls + @list_crawled_urls = ::Gapic::Config::Method.new list_crawled_urls_config + get_finding_config = parent_rpcs.get_finding if parent_rpcs.respond_to? :get_finding + @get_finding = ::Gapic::Config::Method.new get_finding_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_finding_type_stats_config = parent_rpcs.list_finding_type_stats if parent_rpcs.respond_to? :list_finding_type_stats + @list_finding_type_stats = ::Gapic::Config::Method.new list_finding_type_stats_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/credentials.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/credentials.rb new file mode 100644 index 000000000000..2112c835a5a7 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/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 WebSecurityScanner + module V1 + module WebSecurityScanner + # Credentials for the WebSecurityScanner API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "WEB_SECURITY_SCANNER_CREDENTIALS", + "WEB_SECURITY_SCANNER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "WEB_SECURITY_SCANNER_CREDENTIALS_JSON", + "WEB_SECURITY_SCANNER_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-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest.rb new file mode 100644 index 000000000000..f23009d99847 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/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/web_security_scanner/v1/version" + +require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials" +require "google/cloud/web_security_scanner/v1/web_security_scanner/rest/client" + +module Google + module Cloud + module WebSecurityScanner + module V1 + ## + # Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/web_security_scanner/v1/web_security_scanner/rest" + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + module WebSecurityScanner + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/web_security_scanner/v1/web_security_scanner/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/client.rb new file mode 100644 index 000000000000..34f66942801b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/client.rb @@ -0,0 +1,1585 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/websecurityscanner/v1/web_security_scanner_pb" +require "google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub" + +module Google + module Cloud + module WebSecurityScanner + module V1 + module WebSecurityScanner + module Rest + ## + # REST client for the WebSecurityScanner service. + # + # Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "websecurityscanner.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :web_security_scanner_stub + + ## + # Configure the WebSecurityScanner Client class. + # + # See {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WebSecurityScanner clients + # ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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", "WebSecurityScanner", "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_scan_config.timeout = 600.0 + + default_config.rpcs.delete_scan_config.timeout = 600.0 + default_config.rpcs.delete_scan_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_scan_config.timeout = 600.0 + default_config.rpcs.get_scan_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_scan_configs.timeout = 600.0 + default_config.rpcs.list_scan_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_scan_config.timeout = 600.0 + + default_config.rpcs.start_scan_run.timeout = 600.0 + + default_config.rpcs.get_scan_run.timeout = 600.0 + default_config.rpcs.get_scan_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_scan_runs.timeout = 600.0 + default_config.rpcs.list_scan_runs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.stop_scan_run.timeout = 600.0 + + default_config.rpcs.list_crawled_urls.timeout = 600.0 + default_config.rpcs.list_crawled_urls.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_finding.timeout = 600.0 + default_config.rpcs.get_finding.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 600.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_finding_type_stats.timeout = 600.0 + default_config.rpcs.list_finding_type_stats.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 WebSecurityScanner Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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 + @web_security_scanner_stub.universe_domain + end + + ## + # Create a new WebSecurityScanner REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WebSecurityScanner 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 + + @web_security_scanner_stub = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @web_security_scanner_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 + @web_security_scanner_stub.logger + end + + # Service calls + + ## + # Creates a new ScanConfig. + # + # @overload create_scan_config(request, options = nil) + # Pass arguments to `create_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_scan_config(parent: nil, scan_config: nil) + # Pass arguments to `create_scan_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name where the scan is created, which should be a + # project resource name in the format 'projects/\\{projectId}'. + # @param scan_config [::Google::Cloud::WebSecurityScanner::V1::ScanConfig, ::Hash] + # Required. The ScanConfig to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new + # + # # Call the create_scan_config method. + # result = client.create_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. + # p result + # + def create_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest + + # Converts hash and nil to an 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_scan_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::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_scan_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.create_scan_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing ScanConfig and its child resources. + # + # @overload delete_scan_config(request, options = nil) + # Pass arguments to `delete_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_scan_config(name: nil) + # Pass arguments to `delete_scan_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 resource name of the ScanConfig to be deleted. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new + # + # # Call the delete_scan_config method. + # result = client.delete_scan_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_scan_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::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_scan_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.delete_scan_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ScanConfig. + # + # @overload get_scan_config(request, options = nil) + # Pass arguments to `get_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_scan_config(name: nil) + # Pass arguments to `get_scan_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 resource name of the ScanConfig to be returned. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new + # + # # Call the get_scan_config method. + # result = client.get_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. + # p result + # + def get_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_scan_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::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_scan_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.get_scan_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists ScanConfigs under a given project. + # + # @overload list_scan_configs(request, options = nil) + # Pass arguments to `list_scan_configs` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_scan_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_scan_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, which should be a project resource name in the + # format 'projects/\\{projectId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of ScanConfigs to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new + # + # # Call the list_scan_configs method. + # result = client.list_scan_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::WebSecurityScanner::V1::ScanConfig. + # p item + # end + # + def list_scan_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_scan_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::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_scan_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scan_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_scan_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, "scan_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a ScanConfig. This method support partial update of a ScanConfig. + # + # @overload update_scan_config(request, options = nil) + # Pass arguments to `update_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_scan_config(scan_config: nil, update_mask: nil) + # Pass arguments to `update_scan_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 scan_config [::Google::Cloud::WebSecurityScanner::V1::ScanConfig, ::Hash] + # Required. The ScanConfig to be updated. The name field must be set to identify the + # resource to be updated. The values of fields not covered by the mask + # will be ignored. + # @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::WebSecurityScanner::V1::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new + # + # # Call the update_scan_config method. + # result = client.update_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. + # p result + # + def update_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_scan_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::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_scan_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.update_scan_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 + + ## + # Start a ScanRun according to the given ScanConfig. + # + # @overload start_scan_run(request, options = nil) + # Pass arguments to `start_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scan_run(name: nil) + # Pass arguments to `start_scan_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 resource name of the ScanConfig to be used. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new + # + # # Call the start_scan_run method. + # result = client.start_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. + # p result + # + def start_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest + + # Converts hash and nil to an 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_scan_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::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_scan_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.start_scan_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 + + ## + # Gets a ScanRun. + # + # @overload get_scan_run(request, options = nil) + # Pass arguments to `get_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_scan_run(name: nil) + # Pass arguments to `get_scan_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 resource name of the ScanRun to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new + # + # # Call the get_scan_run method. + # result = client.get_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. + # p result + # + def get_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_scan_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::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_scan_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.get_scan_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 + + ## + # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + # stop time. + # + # @overload list_scan_runs(request, options = nil) + # Pass arguments to `list_scan_runs` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_scan_runs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_scan_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. The parent resource name, which should be a scan resource name in the + # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of ScanRuns to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new + # + # # Call the list_scan_runs method. + # result = client.list_scan_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::WebSecurityScanner::V1::ScanRun. + # p item + # end + # + def list_scan_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_scan_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::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_scan_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scan_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_scan_runs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_runs, "scan_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 + + ## + # Stops a ScanRun. The stopped ScanRun is returned. + # + # @overload stop_scan_run(request, options = nil) + # Pass arguments to `stop_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scan_run(name: nil) + # Pass arguments to `stop_scan_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 resource name of the ScanRun to be stopped. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new + # + # # Call the stop_scan_run method. + # result = client.stop_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. + # p result + # + def stop_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest + + # Converts hash and nil to an 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_scan_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::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_scan_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stop_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.stop_scan_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 + + ## + # List CrawledUrls under a given ScanRun. + # + # @overload list_crawled_urls(request, options = nil) + # Pass arguments to `list_crawled_urls` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_crawled_urls(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_crawled_urls` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of CrawledUrls to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new + # + # # Call the list_crawled_urls method. + # result = client.list_crawled_urls request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::CrawledUrl. + # p item + # end + # + def list_crawled_urls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_crawled_urls.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_crawled_urls.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_crawled_urls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_crawled_urls request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, "crawled_urls", request, result, 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 Finding. + # + # @overload get_finding(request, options = nil) + # Pass arguments to `get_finding` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_finding(name: nil) + # Pass arguments to `get_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Finding to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new + # + # # Call the get_finding method. + # result = client.get_finding request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::Finding. + # p result + # + def get_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.get_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List Findings under a given ScanRun. + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @param filter [::String] + # The filter expression. The expression must be in the format: + # . + # Supported field: 'finding_type'. + # Supported operator: '='. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of Findings to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::Finding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::Finding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::Finding. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_findings, "findings", request, result, 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 FindingTypeStats under a given ScanRun. + # + # @overload list_finding_type_stats(request, options = nil) + # Pass arguments to `list_finding_type_stats` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_finding_type_stats(parent: nil) + # Pass arguments to `list_finding_type_stats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new + # + # # Call the list_finding_type_stats method. + # result = client.list_finding_type_stats request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse. + # p result + # + def list_finding_type_stats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_finding_type_stats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_finding_type_stats.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_finding_type_stats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_finding_type_stats request, 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 WebSecurityScanner REST API. + # + # This class represents the configuration for WebSecurityScanner 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::WebSecurityScanner::V1::WebSecurityScanner::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_scan_config to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_scan_config.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_scan_config.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "websecurityscanner.googleapis.com" + + config_attr :endpoint, nil, ::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 WebSecurityScanner API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scan_config + ## + # RPC-specific configuration for `delete_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scan_config + ## + # RPC-specific configuration for `get_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scan_config + ## + # RPC-specific configuration for `list_scan_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scan_configs + ## + # RPC-specific configuration for `update_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scan_config + ## + # RPC-specific configuration for `start_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :start_scan_run + ## + # RPC-specific configuration for `get_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scan_run + ## + # RPC-specific configuration for `list_scan_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scan_runs + ## + # RPC-specific configuration for `stop_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_scan_run + ## + # RPC-specific configuration for `list_crawled_urls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_crawled_urls + ## + # RPC-specific configuration for `get_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_finding + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_finding_type_stats` + # @return [::Gapic::Config::Method] + # + attr_reader :list_finding_type_stats + + # @private + def initialize parent_rpcs = nil + create_scan_config_config = parent_rpcs.create_scan_config if parent_rpcs.respond_to? :create_scan_config + @create_scan_config = ::Gapic::Config::Method.new create_scan_config_config + delete_scan_config_config = parent_rpcs.delete_scan_config if parent_rpcs.respond_to? :delete_scan_config + @delete_scan_config = ::Gapic::Config::Method.new delete_scan_config_config + get_scan_config_config = parent_rpcs.get_scan_config if parent_rpcs.respond_to? :get_scan_config + @get_scan_config = ::Gapic::Config::Method.new get_scan_config_config + list_scan_configs_config = parent_rpcs.list_scan_configs if parent_rpcs.respond_to? :list_scan_configs + @list_scan_configs = ::Gapic::Config::Method.new list_scan_configs_config + update_scan_config_config = parent_rpcs.update_scan_config if parent_rpcs.respond_to? :update_scan_config + @update_scan_config = ::Gapic::Config::Method.new update_scan_config_config + start_scan_run_config = parent_rpcs.start_scan_run if parent_rpcs.respond_to? :start_scan_run + @start_scan_run = ::Gapic::Config::Method.new start_scan_run_config + get_scan_run_config = parent_rpcs.get_scan_run if parent_rpcs.respond_to? :get_scan_run + @get_scan_run = ::Gapic::Config::Method.new get_scan_run_config + list_scan_runs_config = parent_rpcs.list_scan_runs if parent_rpcs.respond_to? :list_scan_runs + @list_scan_runs = ::Gapic::Config::Method.new list_scan_runs_config + stop_scan_run_config = parent_rpcs.stop_scan_run if parent_rpcs.respond_to? :stop_scan_run + @stop_scan_run = ::Gapic::Config::Method.new stop_scan_run_config + list_crawled_urls_config = parent_rpcs.list_crawled_urls if parent_rpcs.respond_to? :list_crawled_urls + @list_crawled_urls = ::Gapic::Config::Method.new list_crawled_urls_config + get_finding_config = parent_rpcs.get_finding if parent_rpcs.respond_to? :get_finding + @get_finding = ::Gapic::Config::Method.new get_finding_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_finding_type_stats_config = parent_rpcs.list_finding_type_stats if parent_rpcs.respond_to? :list_finding_type_stats + @list_finding_type_stats = ::Gapic::Config::Method.new list_finding_type_stats_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub.rb new file mode 100644 index 000000000000..e6edf6a664f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub.rb @@ -0,0 +1,878 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/websecurityscanner/v1/web_security_scanner_pb" + +module Google + module Cloud + module WebSecurityScanner + module V1 + module WebSecurityScanner + module Rest + ## + # REST service stub for the WebSecurityScanner 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_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # A result object deserialized from the server's reply + def create_scan_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_scan_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_scan_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_scan_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_scan_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_scan_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_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # A result object deserialized from the server's reply + def get_scan_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scan_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_scan_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_scan_configs REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse] + # A result object deserialized from the server's reply + def list_scan_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scan_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_scan_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # A result object deserialized from the server's reply + def update_scan_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_scan_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_scan_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.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_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # A result object deserialized from the server's reply + def start_scan_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_scan_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: "start_scan_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # A result object deserialized from the server's reply + def get_scan_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scan_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_scan_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_scan_runs REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse] + # A result object deserialized from the server's reply + def list_scan_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scan_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_scan_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse.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_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] + # A result object deserialized from the server's reply + def stop_scan_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stop_scan_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: "stop_scan_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_crawled_urls REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse] + # A result object deserialized from the server's reply + def list_crawled_urls request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_crawled_urls_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_crawled_urls", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_finding REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::Finding] + # A result object deserialized from the server's reply + def get_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_findings REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse] + # A result object deserialized from the server's reply + def list_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_finding_type_stats REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] + # A result object deserialized from the server's reply + def list_finding_type_stats request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_finding_type_stats_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_finding_type_stats", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse.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_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest] + # 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_scan_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/scanConfigs", + body: "scan_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_scan_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_scan_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scan_configs REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_scan_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/scanConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_scan_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{scan_config.name}", + body: "scan_config", + matches: [ + ["scan_config.name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest] + # 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_scan_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_scan_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scan_runs REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_scan_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/scanRuns", + matches: [ + ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the stop_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest] + # 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_scan_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:stop", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_crawled_urls REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_crawled_urls_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/crawledUrls", + matches: [ + ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_finding REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_findings REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findings", + matches: [ + ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_finding_type_stats REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_finding_type_stats_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/findingTypeStats", + matches: [ + ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/crawled_url_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/crawled_url_pb.rb new file mode 100644 index 000000000000..efefdf647928 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/crawled_url_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/crawled_url.proto + +require 'google/protobuf' + + +descriptor_data = "\n4google/cloud/websecurityscanner/v1/crawled_url.proto\x12\"google.cloud.websecurityscanner.v1\"<\n\nCrawledUrl\x12\x13\n\x0bhttp_method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0c\n\x04\x62ody\x18\x03 \x01(\tB\x85\x02\n&com.google.cloud.websecurityscanner.v1B\x0f\x43rawledUrlProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + CrawledUrl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.CrawledUrl").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_addon_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_addon_pb.rb new file mode 100644 index 000000000000..f2048c20daa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_addon_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/finding_addon.proto + +require 'google/protobuf' + + +descriptor_data = "\n6google/cloud/websecurityscanner/v1/finding_addon.proto\x12\"google.cloud.websecurityscanner.v1\"*\n\x04\x46orm\x12\x12\n\naction_uri\x18\x01 \x01(\t\x12\x0e\n\x06\x66ields\x18\x02 \x03(\t\"Q\n\x0fOutdatedLibrary\x12\x14\n\x0clibrary_name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x17\n\x0flearn_more_urls\x18\x03 \x03(\t\"?\n\x11ViolatingResource\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x14\n\x0cresource_url\x18\x02 \x01(\t\"/\n\x14VulnerableParameters\x12\x17\n\x0fparameter_names\x18\x01 \x03(\t\"\xe0\x01\n\x11VulnerableHeaders\x12M\n\x07headers\x18\x01 \x03(\x0b\x32<.google.cloud.websecurityscanner.v1.VulnerableHeaders.Header\x12U\n\x0fmissing_headers\x18\x02 \x03(\x0b\x32<.google.cloud.websecurityscanner.v1.VulnerableHeaders.Header\x1a%\n\x06Header\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xdb\x03\n\x03Xss\x12\x14\n\x0cstack_traces\x18\x01 \x03(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12K\n\rattack_vector\x18\x03 \x01(\x0e\x32\x34.google.cloud.websecurityscanner.v1.Xss.AttackVector\x12\x1e\n\x16stored_xss_seeding_url\x18\x04 \x01(\t\"\xb9\x02\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x11\n\rLOCAL_STORAGE\x10\x01\x12\x13\n\x0fSESSION_STORAGE\x10\x02\x12\x0f\n\x0bWINDOW_NAME\x10\x03\x12\x0c\n\x08REFERRER\x10\x04\x12\x0e\n\nFORM_INPUT\x10\x05\x12\n\n\x06\x43OOKIE\x10\x06\x12\x10\n\x0cPOST_MESSAGE\x10\x07\x12\x12\n\x0eGET_PARAMETERS\x10\x08\x12\x10\n\x0cURL_FRAGMENT\x10\t\x12\x10\n\x0cHTML_COMMENT\x10\n\x12\x13\n\x0fPOST_PARAMETERS\x10\x0b\x12\x0c\n\x08PROTOCOL\x10\x0c\x12\x0e\n\nSTORED_XSS\x10\r\x12\x0f\n\x0bSAME_ORIGIN\x10\x0e\x12\x19\n\x15USER_CONTROLLABLE_URL\x10\x0f\"\xa9\x01\n\x03Xxe\x12\x15\n\rpayload_value\x18\x01 \x01(\t\x12J\n\x10payload_location\x18\x02 \x01(\x0e\x32\x30.google.cloud.websecurityscanner.v1.Xxe.Location\"?\n\x08Location\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43OMPLETE_REQUEST_BODY\x10\x01\x42\x87\x02\n&com.google.cloud.websecurityscanner.v1B\x11\x46indingAddonProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + Form = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Form").msgclass + OutdatedLibrary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.OutdatedLibrary").msgclass + ViolatingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ViolatingResource").msgclass + VulnerableParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.VulnerableParameters").msgclass + VulnerableHeaders = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.VulnerableHeaders").msgclass + VulnerableHeaders::Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.VulnerableHeaders.Header").msgclass + Xss = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Xss").msgclass + Xss::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Xss.AttackVector").enummodule + Xxe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Xxe").msgclass + Xxe::Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Xxe.Location").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_pb.rb new file mode 100644 index 000000000000..9410b14b3ae8 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/finding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/websecurityscanner/v1/finding_addon_pb' + + +descriptor_data = "\n0google/cloud/websecurityscanner/v1/finding.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x36google/cloud/websecurityscanner/v1/finding_addon.proto\"\xec\x07\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x66inding_type\x18\x02 \x01(\t\x12K\n\x08severity\x18\x11 \x01(\x0e\x32\x34.google.cloud.websecurityscanner.v1.Finding.SeverityB\x03\xe0\x41\x03\x12\x13\n\x0bhttp_method\x18\x03 \x01(\t\x12\x12\n\nfuzzed_url\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x18\n\x10reproduction_url\x18\x07 \x01(\t\x12\x11\n\tframe_url\x18\x08 \x01(\t\x12\x11\n\tfinal_url\x18\t \x01(\t\x12\x13\n\x0btracking_id\x18\n \x01(\t\x12\x36\n\x04\x66orm\x18\x10 \x01(\x0b\x32(.google.cloud.websecurityscanner.v1.Form\x12M\n\x10outdated_library\x18\x0b \x01(\x0b\x32\x33.google.cloud.websecurityscanner.v1.OutdatedLibrary\x12Q\n\x12violating_resource\x18\x0c \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.ViolatingResource\x12Q\n\x12vulnerable_headers\x18\x0f \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.VulnerableHeaders\x12W\n\x15vulnerable_parameters\x18\r \x01(\x0b\x32\x38.google.cloud.websecurityscanner.v1.VulnerableParameters\x12\x34\n\x03xss\x18\x0e \x01(\x0b\x32\'.google.cloud.websecurityscanner.v1.Xss\x12\x39\n\x03xxe\x18\x12 \x01(\x0b\x32\'.google.cloud.websecurityscanner.v1.XxeB\x03\xe0\x41\x03\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04:\x84\x01\xea\x41\x80\x01\n)websecurityscanner.googleapis.com/Finding\x12Sprojects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}B\x82\x02\n&com.google.cloud.websecurityscanner.v1B\x0c\x46indingProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.websecurityscanner.v1.Form", "google/cloud/websecurityscanner/v1/finding_addon.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Finding").msgclass + Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Finding.Severity").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_type_stats_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_type_stats_pb.rb new file mode 100644 index 000000000000..20fb14af2f5d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_type_stats_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/finding_type_stats.proto + +require 'google/protobuf' + + +descriptor_data = "\n;google/cloud/websecurityscanner/v1/finding_type_stats.proto\x12\"google.cloud.websecurityscanner.v1\"?\n\x10\x46indingTypeStats\x12\x14\n\x0c\x66inding_type\x18\x01 \x01(\t\x12\x15\n\rfinding_count\x18\x02 \x01(\x05\x42\x8b\x02\n&com.google.cloud.websecurityscanner.v1B\x15\x46indingTypeStatsProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + FindingTypeStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.FindingTypeStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_error_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_error_pb.rb new file mode 100644 index 000000000000..d798b7b62388 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_error_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/scan_config_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/cloud/websecurityscanner/v1/scan_config_error.proto\x12\"google.cloud.websecurityscanner.v1\"\xe9\x0b\n\x0fScanConfigError\x12\x46\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x38.google.cloud.websecurityscanner.v1.ScanConfigError.Code\x12\x12\n\nfield_name\x18\x02 \x01(\t\"\xf9\n\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x1f\n\x1b\x41PPENGINE_API_BACKEND_ERROR\x10\x02\x12 \n\x1c\x41PPENGINE_API_NOT_ACCESSIBLE\x10\x03\x12\"\n\x1e\x41PPENGINE_DEFAULT_HOST_MISSING\x10\x04\x12!\n\x1d\x43\x41NNOT_USE_GOOGLE_COM_ACCOUNT\x10\x06\x12\x1c\n\x18\x43\x41NNOT_USE_OWNER_ACCOUNT\x10\x07\x12\x1d\n\x19\x43OMPUTE_API_BACKEND_ERROR\x10\x08\x12\x1e\n\x1a\x43OMPUTE_API_NOT_ACCESSIBLE\x10\t\x12\x37\n3CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\n\x12\x1e\n\x1a\x43USTOM_LOGIN_URL_MALFORMED\x10\x0b\x12\x33\n/CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x0c\x12\x31\n-CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10\r\x12\x30\n,CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10\x0e\x12.\n*CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS\x10\x0f\x12\x17\n\x13\x44UPLICATE_SCAN_NAME\x10\x10\x12\x17\n\x13INVALID_FIELD_VALUE\x10\x12\x12$\n FAILED_TO_AUTHENTICATE_TO_TARGET\x10\x13\x12\x1c\n\x18\x46INDING_TYPE_UNSPECIFIED\x10\x14\x12\x1d\n\x19\x46ORBIDDEN_TO_SCAN_COMPUTE\x10\x15\x12$\n FORBIDDEN_UPDATE_TO_MANAGED_SCAN\x10+\x12\x14\n\x10MALFORMED_FILTER\x10\x16\x12\x1b\n\x17MALFORMED_RESOURCE_NAME\x10\x17\x12\x14\n\x10PROJECT_INACTIVE\x10\x18\x12\x12\n\x0eREQUIRED_FIELD\x10\x19\x12\x1e\n\x1aRESOURCE_NAME_INCONSISTENT\x10\x1a\x12\x18\n\x14SCAN_ALREADY_RUNNING\x10\x1b\x12\x14\n\x10SCAN_NOT_RUNNING\x10\x1c\x12/\n+SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\x1d\x12\x16\n\x12SEED_URL_MALFORMED\x10\x1e\x12+\n\'SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x1f\x12)\n%SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10 \x12(\n$SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10!\x12&\n\"SEED_URL_HAS_UNRESERVED_IP_ADDRESS\x10#\x12\"\n\x1eSERVICE_ACCOUNT_NOT_CONFIGURED\x10$\x12\x12\n\x0eTOO_MANY_SCANS\x10%\x12\"\n\x1eUNABLE_TO_RESOLVE_PROJECT_INFO\x10&\x12(\n$UNSUPPORTED_BLACKLIST_PATTERN_FORMAT\x10\'\x12\x16\n\x12UNSUPPORTED_FILTER\x10(\x12\x1c\n\x18UNSUPPORTED_FINDING_TYPE\x10)\x12\x1a\n\x16UNSUPPORTED_URL_SCHEME\x10*\x1a\x02\x10\x01\x42\x8a\x02\n&com.google.cloud.websecurityscanner.v1B\x14ScanConfigErrorProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + ScanConfigError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfigError").msgclass + ScanConfigError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfigError.Code").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_pb.rb new file mode 100644 index 000000000000..2d1bab8f64ef --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/scan_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/websecurityscanner/v1/scan_config.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\r\n\nScanConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07max_qps\x18\x03 \x01(\x05\x12\x15\n\rstarting_urls\x18\x04 \x03(\t\x12U\n\x0e\x61uthentication\x18\x05 \x01(\x0b\x32=.google.cloud.websecurityscanner.v1.ScanConfig.Authentication\x12L\n\nuser_agent\x18\x06 \x01(\x0e\x32\x38.google.cloud.websecurityscanner.v1.ScanConfig.UserAgent\x12\x1a\n\x12\x62lacklist_patterns\x18\x07 \x03(\t\x12I\n\x08schedule\x18\x08 \x01(\x0b\x32\x37.google.cloud.websecurityscanner.v1.ScanConfig.Schedule\x12w\n!export_to_security_command_center\x18\n \x01(\x0e\x32L.google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter\x12L\n\nrisk_level\x18\x0c \x01(\x0e\x32\x38.google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel\x12\x14\n\x0cmanaged_scan\x18\r \x01(\x08\x12\x16\n\x0estatic_ip_scan\x18\x0e \x01(\x08\x12!\n\x19ignore_http_status_errors\x18\x0f \x01(\x08\x1a\xd7\x05\n\x0e\x41uthentication\x12i\n\x0egoogle_account\x18\x01 \x01(\x0b\x32K.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.GoogleAccountB\x02\x18\x01H\x00\x12\x65\n\x0e\x63ustom_account\x18\x02 \x01(\x0b\x32K.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.CustomAccountH\x00\x12\x65\n\x0eiap_credential\x18\x04 \x01(\x0b\x32K.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredentialH\x00\x1a\x37\n\rGoogleAccount\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t:\x02\x18\x01\x1a\x46\n\rCustomAccount\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x12\x11\n\tlogin_url\x18\x03 \x01(\t\x1a\xf8\x01\n\rIapCredential\x12\x8e\x01\n\x1diap_test_service_account_info\x18\x01 \x01(\x0b\x32\x65.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfoH\x00\x1a\x43\n\x19IapTestServiceAccountInfo\x12&\n\x19target_audience_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x11\n\x0fiap_credentialsB\x10\n\x0e\x61uthentication\x1a]\n\x08Schedule\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16interval_duration_days\x18\x02 \x01(\x05\"`\n\tUserAgent\x12\x1a\n\x16USER_AGENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43HROME_LINUX\x10\x01\x12\x12\n\x0e\x43HROME_ANDROID\x10\x02\x12\x11\n\rSAFARI_IPHONE\x10\x03\"<\n\tRiskLevel\x12\x1a\n\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\"m\n\x1d\x45xportToSecurityCommandCenter\x12\x31\n-EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x42\x85\x02\n&com.google.cloud.websecurityscanner.v1B\x0fScanConfigProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + ScanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig").msgclass + ScanConfig::Authentication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication").msgclass + ScanConfig::Authentication::GoogleAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication.GoogleAccount").msgclass + ScanConfig::Authentication::CustomAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication.CustomAccount").msgclass + ScanConfig::Authentication::IapCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential").msgclass + ScanConfig::Authentication::IapCredential::IapTestServiceAccountInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfo").msgclass + ScanConfig::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Schedule").msgclass + ScanConfig::UserAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.UserAgent").enummodule + ScanConfig::RiskLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel").enummodule + ScanConfig::ExportToSecurityCommandCenter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_error_trace_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_error_trace_pb.rb new file mode 100644 index 000000000000..b5eeb0e50fd7 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_error_trace_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/scan_run_error_trace.proto + +require 'google/protobuf' + +require 'google/cloud/websecurityscanner/v1/scan_config_error_pb' + + +descriptor_data = "\n=google/cloud/websecurityscanner/v1/scan_run_error_trace.proto\x12\"google.cloud.websecurityscanner.v1\x1a:google/cloud/websecurityscanner/v1/scan_config_error.proto\"\x8d\x03\n\x11ScanRunErrorTrace\x12H\n\x04\x63ode\x18\x01 \x01(\x0e\x32:.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code\x12N\n\x11scan_config_error\x18\x02 \x01(\x0b\x32\x33.google.cloud.websecurityscanner.v1.ScanConfigError\x12#\n\x1bmost_common_http_error_code\x18\x03 \x01(\x05\"\xb8\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x15\n\x11SCAN_CONFIG_ISSUE\x10\x02\x12\x1f\n\x1b\x41UTHENTICATION_CONFIG_ISSUE\x10\x03\x12\x1c\n\x18TIMED_OUT_WHILE_SCANNING\x10\x04\x12\x16\n\x12TOO_MANY_REDIRECTS\x10\x05\x12\x18\n\x14TOO_MANY_HTTP_ERRORS\x10\x06\x42\x8c\x02\n&com.google.cloud.websecurityscanner.v1B\x16ScanRunErrorTraceProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.websecurityscanner.v1.ScanConfigError", "google/cloud/websecurityscanner/v1/scan_config_error.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + ScanRunErrorTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunErrorTrace").msgclass + ScanRunErrorTrace::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_log_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_log_pb.rb new file mode 100644 index 000000000000..145018be74af --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_log_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/scan_run_log.proto + +require 'google/protobuf' + +require 'google/cloud/websecurityscanner/v1/scan_run_pb' +require 'google/cloud/websecurityscanner/v1/scan_run_error_trace_pb' + + +descriptor_data = "\n5google/cloud/websecurityscanner/v1/scan_run_log.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x31google/cloud/websecurityscanner/v1/scan_run.proto\x1a=google/cloud/websecurityscanner/v1/scan_run_error_trace.proto\"\xe8\x02\n\nScanRunLog\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12S\n\x0f\x65xecution_state\x18\x03 \x01(\x0e\x32:.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState\x12M\n\x0cresult_state\x18\x04 \x01(\x0e\x32\x37.google.cloud.websecurityscanner.v1.ScanRun.ResultState\x12\x1a\n\x12urls_crawled_count\x18\x05 \x01(\x03\x12\x19\n\x11urls_tested_count\x18\x06 \x01(\x03\x12\x14\n\x0chas_findings\x18\x07 \x01(\x08\x12J\n\x0b\x65rror_trace\x18\x08 \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.ScanRunErrorTraceB\x85\x02\n&com.google.cloud.websecurityscanner.v1B\x0fScanRunLogProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.websecurityscanner.v1.ScanRunErrorTrace", "google/cloud/websecurityscanner/v1/scan_run_error_trace.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + ScanRunLog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunLog").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_pb.rb new file mode 100644 index 000000000000..febd99f3e5f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/scan_run.proto + +require 'google/protobuf' + +require 'google/cloud/websecurityscanner/v1/scan_run_error_trace_pb' +require 'google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/cloud/websecurityscanner/v1/scan_run.proto\x12\"google.cloud.websecurityscanner.v1\x1a=google/cloud/websecurityscanner/v1/scan_run_error_trace.proto\x1a?google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd0\x05\n\x07ScanRun\x12\x0c\n\x04name\x18\x01 \x01(\t\x12S\n\x0f\x65xecution_state\x18\x02 \x01(\x0e\x32:.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState\x12M\n\x0cresult_state\x18\x03 \x01(\x0e\x32\x37.google.cloud.websecurityscanner.v1.ScanRun.ResultState\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12urls_crawled_count\x18\x06 \x01(\x03\x12\x19\n\x11urls_tested_count\x18\x07 \x01(\x03\x12\x1b\n\x13has_vulnerabilities\x18\x08 \x01(\x08\x12\x18\n\x10progress_percent\x18\t \x01(\x05\x12J\n\x0b\x65rror_trace\x18\n \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.ScanRunErrorTrace\x12O\n\x0ewarning_traces\x18\x0b \x03(\x0b\x32\x37.google.cloud.websecurityscanner.v1.ScanRunWarningTrace\"Y\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0c\n\x08SCANNING\x10\x02\x12\x0c\n\x08\x46INISHED\x10\x03\"O\n\x0bResultState\x12\x1c\n\x18RESULT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\n\n\x06KILLED\x10\x03\x42\x82\x02\n&com.google.cloud.websecurityscanner.v1B\x0cScanRunProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.websecurityscanner.v1.ScanRunErrorTrace", "google/cloud/websecurityscanner/v1/scan_run_error_trace.proto"], + ["google.cloud.websecurityscanner.v1.ScanRunWarningTrace", "google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + ScanRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRun").msgclass + ScanRun::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRun.ExecutionState").enummodule + ScanRun::ResultState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRun.ResultState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb.rb new file mode 100644 index 000000000000..f0968f2a598c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto\x12\"google.cloud.websecurityscanner.v1\"\x95\x02\n\x13ScanRunWarningTrace\x12J\n\x04\x63ode\x18\x01 \x01(\x0e\x32<.google.cloud.websecurityscanner.v1.ScanRunWarningTrace.Code\"\xb1\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aINSUFFICIENT_CRAWL_RESULTS\x10\x01\x12\x1a\n\x16TOO_MANY_CRAWL_RESULTS\x10\x02\x12\x17\n\x13TOO_MANY_FUZZ_TASKS\x10\x03\x12\x12\n\x0e\x42LOCKED_BY_IAP\x10\x04\x12*\n&NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN\x10\x05\x42\x8e\x02\n&com.google.cloud.websecurityscanner.v1B\x18ScanRunWarningTraceProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1 + ScanRunWarningTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunWarningTrace").msgclass + ScanRunWarningTrace::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunWarningTrace.Code").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_pb.rb new file mode 100644 index 000000000000..e7bb8473da3c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_pb.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1/web_security_scanner.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/cloud/websecurityscanner/v1/crawled_url_pb' +require 'google/cloud/websecurityscanner/v1/finding_pb' +require 'google/cloud/websecurityscanner/v1/finding_type_stats_pb' +require 'google/cloud/websecurityscanner/v1/scan_config_pb' +require 'google/cloud/websecurityscanner/v1/scan_run_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\n=google/cloud/websecurityscanner/v1/web_security_scanner.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x34google/cloud/websecurityscanner/v1/crawled_url.proto\x1a\x30google/cloud/websecurityscanner/v1/finding.proto\x1a;google/cloud/websecurityscanner/v1/finding_type_stats.proto\x1a\x34google/cloud/websecurityscanner/v1/scan_config.proto\x1a\x31google/cloud/websecurityscanner/v1/scan_run.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"n\n\x17\x43reateScanConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x43\n\x0bscan_config\x18\x02 \x01(\x0b\x32..google.cloud.websecurityscanner.v1.ScanConfig\"\'\n\x17\x44\x65leteScanConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"$\n\x14GetScanConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"O\n\x16ListScanConfigsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8f\x01\n\x17UpdateScanConfigRequest\x12\x43\n\x0bscan_config\x18\x02 \x01(\x0b\x32..google.cloud.websecurityscanner.v1.ScanConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"x\n\x17ListScanConfigsResponse\x12\x44\n\x0cscan_configs\x18\x01 \x03(\x0b\x32..google.cloud.websecurityscanner.v1.ScanConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"#\n\x13StartScanRunRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"!\n\x11GetScanRunRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"L\n\x13ListScanRunsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"o\n\x14ListScanRunsResponse\x12>\n\tscan_runs\x18\x01 \x03(\x0b\x32+.google.cloud.websecurityscanner.v1.ScanRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\"\n\x12StopScanRunRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"O\n\x16ListCrawledUrlsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"x\n\x17ListCrawledUrlsResponse\x12\x44\n\x0c\x63rawled_urls\x18\x01 \x03(\x0b\x32..google.cloud.websecurityscanner.v1.CrawledUrl\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"!\n\x11GetFindingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\\\n\x13ListFindingsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"n\n\x14ListFindingsResponse\x12=\n\x08\x66indings\x18\x01 \x03(\x0b\x32+.google.cloud.websecurityscanner.v1.Finding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"-\n\x1bListFindingTypeStatsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"p\n\x1cListFindingTypeStatsResponse\x12P\n\x12\x66inding_type_stats\x18\x01 \x03(\x0b\x32\x34.google.cloud.websecurityscanner.v1.FindingTypeStats2\xe9\x13\n\x12WebSecurityScanner\x12\xb9\x01\n\x10\x43reateScanConfig\x12;.google.cloud.websecurityscanner.v1.CreateScanConfigRequest\x1a..google.cloud.websecurityscanner.v1.ScanConfig\"8\x82\xd3\xe4\x93\x02\x32\"#/v1/{parent=projects/*}/scanConfigs:\x0bscan_config\x12\x94\x01\n\x10\x44\x65leteScanConfig\x12;.google.cloud.websecurityscanner.v1.DeleteScanConfigRequest\x1a\x16.google.protobuf.Empty\"+\x82\xd3\xe4\x93\x02%*#/v1/{name=projects/*/scanConfigs/*}\x12\xa6\x01\n\rGetScanConfig\x12\x38.google.cloud.websecurityscanner.v1.GetScanConfigRequest\x1a..google.cloud.websecurityscanner.v1.ScanConfig\"+\x82\xd3\xe4\x93\x02%\x12#/v1/{name=projects/*/scanConfigs/*}\x12\xb7\x01\n\x0fListScanConfigs\x12:.google.cloud.websecurityscanner.v1.ListScanConfigsRequest\x1a;.google.cloud.websecurityscanner.v1.ListScanConfigsResponse\"+\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=projects/*}/scanConfigs\x12\xc5\x01\n\x10UpdateScanConfig\x12;.google.cloud.websecurityscanner.v1.UpdateScanConfigRequest\x1a..google.cloud.websecurityscanner.v1.ScanConfig\"D\x82\xd3\xe4\x93\x02>2//v1/{scan_config.name=projects/*/scanConfigs/*}:\x0bscan_config\x12\xaa\x01\n\x0cStartScanRun\x12\x37.google.cloud.websecurityscanner.v1.StartScanRunRequest\x1a+.google.cloud.websecurityscanner.v1.ScanRun\"4\x82\xd3\xe4\x93\x02.\")/v1/{name=projects/*/scanConfigs/*}:start:\x01*\x12\xa8\x01\n\nGetScanRun\x12\x35.google.cloud.websecurityscanner.v1.GetScanRunRequest\x1a+.google.cloud.websecurityscanner.v1.ScanRun\"6\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/scanConfigs/*/scanRuns/*}\x12\xb9\x01\n\x0cListScanRuns\x12\x37.google.cloud.websecurityscanner.v1.ListScanRunsRequest\x1a\x38.google.cloud.websecurityscanner.v1.ListScanRunsResponse\"6\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/scanConfigs/*}/scanRuns\x12\xb2\x01\n\x0bStopScanRun\x12\x36.google.cloud.websecurityscanner.v1.StopScanRunRequest\x1a+.google.cloud.websecurityscanner.v1.ScanRun\">\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/scanConfigs/*/scanRuns/*}:stop:\x01*\x12\xd0\x01\n\x0fListCrawledUrls\x12:.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest\x1a;.google.cloud.websecurityscanner.v1.ListCrawledUrlsResponse\"D\x82\xd3\xe4\x93\x02>\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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/crawled_url.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/crawled_url.rb new file mode 100644 index 000000000000..8a90e045f7c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/crawled_url.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 WebSecurityScanner + module V1 + # A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web + # Security Scanner Service crawls the web applications, following all links + # within the scope of sites, to find the URLs to test against. + # @!attribute [rw] http_method + # @return [::String] + # Output only. The http method of the request that was used to visit the URL, in + # uppercase. + # @!attribute [rw] url + # @return [::String] + # Output only. The URL that was crawled. + # @!attribute [rw] body + # @return [::String] + # Output only. The body of the request that was used to visit the URL. + class CrawledUrl + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding.rb new file mode 100644 index 000000000000..a2ddddfdd390 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding.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 WebSecurityScanner + module V1 + # A Finding resource represents a vulnerability instance identified during a + # ScanRun. + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the Finding. The name follows the format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanruns/\\{scanRunId}/findings/\\{findingId}'. + # The finding IDs are generated by the system. + # @!attribute [rw] finding_type + # @return [::String] + # Output only. The type of the Finding. + # Detailed and up-to-date information on findings can be found here: + # https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings + # @!attribute [r] severity + # @return [::Google::Cloud::WebSecurityScanner::V1::Finding::Severity] + # Output only. The severity level of the reported vulnerability. + # @!attribute [rw] http_method + # @return [::String] + # Output only. The http method of the request that triggered the vulnerability, in + # uppercase. + # @!attribute [rw] fuzzed_url + # @return [::String] + # Output only. The URL produced by the server-side fuzzer and used in the request that + # triggered the vulnerability. + # @!attribute [rw] body + # @return [::String] + # Output only. The body of the request that triggered the vulnerability. + # @!attribute [rw] description + # @return [::String] + # Output only. The description of the vulnerability. + # @!attribute [rw] reproduction_url + # @return [::String] + # Output only. The URL containing human-readable payload that user can leverage to + # reproduce the vulnerability. + # @!attribute [rw] frame_url + # @return [::String] + # Output only. If the vulnerability was originated from nested IFrame, the immediate + # parent IFrame is reported. + # @!attribute [rw] final_url + # @return [::String] + # Output only. The URL where the browser lands when the vulnerability is detected. + # @!attribute [rw] tracking_id + # @return [::String] + # Output only. The tracking ID uniquely identifies a vulnerability instance across + # multiple ScanRuns. + # @!attribute [rw] form + # @return [::Google::Cloud::WebSecurityScanner::V1::Form] + # Output only. An addon containing information reported for a vulnerability with an HTML + # form, if any. + # @!attribute [rw] outdated_library + # @return [::Google::Cloud::WebSecurityScanner::V1::OutdatedLibrary] + # Output only. An addon containing information about outdated libraries. + # @!attribute [rw] violating_resource + # @return [::Google::Cloud::WebSecurityScanner::V1::ViolatingResource] + # Output only. An addon containing detailed information regarding any resource causing the + # vulnerability such as JavaScript sources, image, audio files, etc. + # @!attribute [rw] vulnerable_headers + # @return [::Google::Cloud::WebSecurityScanner::V1::VulnerableHeaders] + # Output only. An addon containing information about vulnerable or missing HTTP headers. + # @!attribute [rw] vulnerable_parameters + # @return [::Google::Cloud::WebSecurityScanner::V1::VulnerableParameters] + # Output only. An addon containing information about request parameters which were found + # to be vulnerable. + # @!attribute [rw] xss + # @return [::Google::Cloud::WebSecurityScanner::V1::Xss] + # Output only. An addon containing information reported for an XSS, if any. + # @!attribute [r] xxe + # @return [::Google::Cloud::WebSecurityScanner::V1::Xxe] + # Output only. An addon containing information reported for an XXE, if any. + class Finding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The severity level of a vulnerability. + module Severity + # No severity specified. The default value. + SEVERITY_UNSPECIFIED = 0 + + # Critical severity. + CRITICAL = 1 + + # High severity. + HIGH = 2 + + # Medium severity. + MEDIUM = 3 + + # Low severity. + LOW = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_addon.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_addon.rb new file mode 100644 index 000000000000..dbd7c7de4641 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_addon.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 WebSecurityScanner + module V1 + # ! Information about a vulnerability with an HTML. + # @!attribute [rw] action_uri + # @return [::String] + # ! The URI where to send the form when it's submitted. + # @!attribute [rw] fields + # @return [::Array<::String>] + # ! The names of form fields related to the vulnerability. + class Form + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information reported for an outdated library. + # @!attribute [rw] library_name + # @return [::String] + # The name of the outdated library. + # @!attribute [rw] version + # @return [::String] + # The version number. + # @!attribute [rw] learn_more_urls + # @return [::Array<::String>] + # URLs to learn more information about the vulnerabilities in the library. + class OutdatedLibrary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information regarding any resource causing the vulnerability such + # as JavaScript sources, image, audio files, etc. + # @!attribute [rw] content_type + # @return [::String] + # The MIME type of this resource. + # @!attribute [rw] resource_url + # @return [::String] + # URL of this violating resource. + class ViolatingResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about vulnerable request parameters. + # @!attribute [rw] parameter_names + # @return [::Array<::String>] + # The vulnerable parameter names. + class VulnerableParameters + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about vulnerable or missing HTTP Headers. + # @!attribute [rw] headers + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::VulnerableHeaders::Header>] + # List of vulnerable headers. + # @!attribute [rw] missing_headers + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::VulnerableHeaders::Header>] + # List of missing headers. + class VulnerableHeaders + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a HTTP Header. + # @!attribute [rw] name + # @return [::String] + # Header name. + # @!attribute [rw] value + # @return [::String] + # Header value. + class Header + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Information reported for an XSS. + # @!attribute [rw] stack_traces + # @return [::Array<::String>] + # Stack traces leading to the point where the XSS occurred. + # @!attribute [rw] error_message + # @return [::String] + # An error message generated by a javascript breakage. + # @!attribute [rw] attack_vector + # @return [::Google::Cloud::WebSecurityScanner::V1::Xss::AttackVector] + # The attack vector of the payload triggering this XSS. + # @!attribute [rw] stored_xss_seeding_url + # @return [::String] + # The reproduction url for the seeding POST request of a Stored XSS. + class Xss + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of XSS attack vector. + module AttackVector + # Unknown attack vector. + ATTACK_VECTOR_UNSPECIFIED = 0 + + # The attack comes from fuzzing the browser's localStorage. + LOCAL_STORAGE = 1 + + # The attack comes from fuzzing the browser's sessionStorage. + SESSION_STORAGE = 2 + + # The attack comes from fuzzing the window's name property. + WINDOW_NAME = 3 + + # The attack comes from fuzzing the referrer property. + REFERRER = 4 + + # The attack comes from fuzzing an input element. + FORM_INPUT = 5 + + # The attack comes from fuzzing the browser's cookies. + COOKIE = 6 + + # The attack comes from hijacking the post messaging mechanism. + POST_MESSAGE = 7 + + # The attack comes from fuzzing parameters in the url. + GET_PARAMETERS = 8 + + # The attack comes from fuzzing the fragment in the url. + URL_FRAGMENT = 9 + + # The attack comes from fuzzing the HTML comments. + HTML_COMMENT = 10 + + # The attack comes from fuzzing the POST parameters. + POST_PARAMETERS = 11 + + # The attack comes from fuzzing the protocol. + PROTOCOL = 12 + + # The attack comes from the server side and is stored. + STORED_XSS = 13 + + # The attack is a Same-Origin Method Execution attack via a GET parameter. + SAME_ORIGIN = 14 + + # The attack payload is received from a third-party host via a URL that is + # user-controllable + USER_CONTROLLABLE_URL = 15 + end + end + + # Information reported for an XXE. + # @!attribute [rw] payload_value + # @return [::String] + # The XML string that triggered the XXE vulnerability. Non-payload values + # might be redacted. + # @!attribute [rw] payload_location + # @return [::Google::Cloud::WebSecurityScanner::V1::Xxe::Location] + # Location within the request where the payload was placed. + class Xxe + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Locations within a request where XML was substituted. + module Location + # Unknown Location. + LOCATION_UNSPECIFIED = 0 + + # The XML payload replaced the complete request body. + COMPLETE_REQUEST_BODY = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_type_stats.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_type_stats.rb new file mode 100644 index 000000000000..d7c9d4981c94 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_type_stats.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1 + # A FindingTypeStats resource represents stats regarding a specific FindingType + # of Findings under a given ScanRun. + # @!attribute [rw] finding_type + # @return [::String] + # Output only. The finding type associated with the stats. + # @!attribute [rw] finding_count + # @return [::Integer] + # Output only. The count of findings belonging to this finding type. + class FindingTypeStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config.rb new file mode 100644 index 000000000000..b09c2e974d3b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config.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 WebSecurityScanner + module V1 + # A ScanConfig resource contains the configurations to launch a scan. + # @!attribute [rw] name + # @return [::String] + # The resource name of the ScanConfig. The name follows the format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. The ScanConfig IDs are + # generated by the system. + # @!attribute [rw] display_name + # @return [::String] + # Required. The user provided display name of the ScanConfig. + # @!attribute [rw] max_qps + # @return [::Integer] + # The maximum QPS during scanning. A valid value ranges from 5 to 20 + # inclusively. If the field is unspecified or its value is set 0, server will + # default to 15. Other values outside of [5, 20] range will be rejected with + # INVALID_ARGUMENT error. + # @!attribute [rw] starting_urls + # @return [::Array<::String>] + # Required. The starting URLs from which the scanner finds site pages. + # @!attribute [rw] authentication + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication] + # The authentication configuration. If specified, service will use the + # authentication configuration during scanning. + # @!attribute [rw] user_agent + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::UserAgent] + # The user agent used during scanning. + # @!attribute [rw] blacklist_patterns + # @return [::Array<::String>] + # The excluded URL patterns as described in + # https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls + # @!attribute [rw] schedule + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Schedule] + # The schedule of the ScanConfig. + # @!attribute [rw] export_to_security_command_center + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::ExportToSecurityCommandCenter] + # Controls export of scan configurations and results to Security + # Command Center. + # @!attribute [rw] risk_level + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::RiskLevel] + # The risk level selected for the scan + # @!attribute [rw] managed_scan + # @return [::Boolean] + # Whether the scan config is managed by Web Security Scanner, output + # only. + # @!attribute [rw] static_ip_scan + # @return [::Boolean] + # Whether the scan configuration has enabled static IP address scan feature. + # If enabled, the scanner will access applications from static IP addresses. + # @!attribute [rw] ignore_http_status_errors + # @return [::Boolean] + # Whether to keep scanning even if most requests return HTTP error codes. + class ScanConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Scan authentication configuration. + # @!attribute [rw] google_account + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication::GoogleAccount] + # Authentication using a Google account. + # + # Note: The following fields are mutually exclusive: `google_account`, `custom_account`, `iap_credential`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_account + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication::CustomAccount] + # Authentication using a custom account. + # + # Note: The following fields are mutually exclusive: `custom_account`, `google_account`, `iap_credential`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] iap_credential + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication::IapCredential] + # Authentication using Identity-Aware-Proxy (IAP). + # + # Note: The following fields are mutually exclusive: `iap_credential`, `google_account`, `custom_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Authentication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes authentication configuration that uses a Google account. + # @deprecated This message is deprecated and may be removed in the next major version update. + # @!attribute [rw] username + # @return [::String] + # Required. The user name of the Google account. + # @!attribute [rw] password + # @return [::String] + # Required. Input only. The password of the Google account. The credential is stored encrypted + # and not returned in any response nor included in audit logs. + class GoogleAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes authentication configuration that uses a custom account. + # @!attribute [rw] username + # @return [::String] + # Required. The user name of the custom account. + # @!attribute [rw] password + # @return [::String] + # Required. Input only. The password of the custom account. The credential is stored encrypted + # and not returned in any response nor included in audit logs. + # @!attribute [rw] login_url + # @return [::String] + # Required. The login form URL of the website. + class CustomAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes authentication configuration for Identity-Aware-Proxy (IAP). + # @!attribute [rw] iap_test_service_account_info + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication::IapCredential::IapTestServiceAccountInfo] + # Authentication configuration when Web-Security-Scanner service + # account is added in Identity-Aware-Proxy (IAP) access policies. + class IapCredential + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes authentication configuration when Web-Security-Scanner + # service account is added in Identity-Aware-Proxy (IAP) access policies. + # @!attribute [rw] target_audience_client_id + # @return [::String] + # Required. Describes OAuth2 client id of resources protected by + # Identity-Aware-Proxy (IAP). + class IapTestServiceAccountInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Scan schedule configuration. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # A timestamp indicates when the next run will be scheduled. The value is + # refreshed by the server after each run. If unspecified, it will default + # to current server time, which means the scan will be scheduled to start + # immediately. + # @!attribute [rw] interval_duration_days + # @return [::Integer] + # Required. The duration of time between executions in days. + class Schedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of user agents used for scanning. + module UserAgent + # The user agent is unknown. Service will default to CHROME_LINUX. + USER_AGENT_UNSPECIFIED = 0 + + # Chrome on Linux. This is the service default if unspecified. + CHROME_LINUX = 1 + + # Chrome on Android. + CHROME_ANDROID = 2 + + # Safari on IPhone. + SAFARI_IPHONE = 3 + end + + # Scan risk levels supported by Web Security Scanner. LOW impact + # scanning will minimize requests with the potential to modify data. To + # achieve the maximum scan coverage, NORMAL risk level is recommended. + module RiskLevel + # Use default, which is NORMAL. + RISK_LEVEL_UNSPECIFIED = 0 + + # Normal scanning (Recommended) + NORMAL = 1 + + # Lower impact scanning + LOW = 2 + end + + # Controls export of scan configurations and results to Security + # Command Center. + module ExportToSecurityCommandCenter + # Use default, which is ENABLED. + EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0 + + # Export results of this scan to Security Command Center. + ENABLED = 1 + + # Do not export results of this scan to Security Command Center. + DISABLED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config_error.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config_error.rb new file mode 100644 index 000000000000..d8e3b62c7efe --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config_error.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 WebSecurityScanner + module V1 + # Defines a custom error message used by CreateScanConfig and UpdateScanConfig + # APIs when scan configuration validation fails. It is also reported as part of + # a ScanRunErrorTrace message if scan validation fails due to a scan + # configuration error. + # @!attribute [rw] code + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfigError::Code] + # Output only. Indicates the reason code for a configuration failure. + # @!attribute [rw] field_name + # @return [::String] + # Output only. Indicates the full name of the ScanConfig field that triggers this error, + # for example "scan_config.max_qps". This field is provided for + # troubleshooting purposes only and its actual value can change in the + # future. + class ScanConfigError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. + # Defines an error reason code. + # Next id: 44 + module Code + # There is no error. + CODE_UNSPECIFIED = 0 + + # There is no error. + OK = 0 + + # Indicates an internal server error. + # Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown. + INTERNAL_ERROR = 1 + + # One of the seed URLs is an App Engine URL but we cannot validate the scan + # settings due to an App Engine API backend error. + APPENGINE_API_BACKEND_ERROR = 2 + + # One of the seed URLs is an App Engine URL but we cannot access the + # App Engine API to validate scan settings. + APPENGINE_API_NOT_ACCESSIBLE = 3 + + # One of the seed URLs is an App Engine URL but the Default Host of the + # App Engine is not set. + APPENGINE_DEFAULT_HOST_MISSING = 4 + + # Google corporate accounts can not be used for scanning. + CANNOT_USE_GOOGLE_COM_ACCOUNT = 6 + + # The account of the scan creator can not be used for scanning. + CANNOT_USE_OWNER_ACCOUNT = 7 + + # This scan targets Compute Engine, but we cannot validate scan settings + # due to a Compute Engine API backend error. + COMPUTE_API_BACKEND_ERROR = 8 + + # This scan targets Compute Engine, but we cannot access the Compute Engine + # API to validate the scan settings. + COMPUTE_API_NOT_ACCESSIBLE = 9 + + # The Custom Login URL does not belong to the current project. + CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10 + + # The Custom Login URL is malformed (can not be parsed). + CUSTOM_LOGIN_URL_MALFORMED = 11 + + # The Custom Login URL is mapped to a non-routable IP address in DNS. + CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12 + + # The Custom Login URL is mapped to an IP address which is not reserved for + # the current project. + CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13 + + # The Custom Login URL has a non-routable IP address. + CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14 + + # The Custom Login URL has an IP address which is not reserved for the + # current project. + CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15 + + # Another scan with the same name (case-sensitive) already exists. + DUPLICATE_SCAN_NAME = 16 + + # A field is set to an invalid value. + INVALID_FIELD_VALUE = 18 + + # There was an error trying to authenticate to the scan target. + FAILED_TO_AUTHENTICATE_TO_TARGET = 19 + + # Finding type value is not specified in the list findings request. + FINDING_TYPE_UNSPECIFIED = 20 + + # Scan targets Compute Engine, yet current project was not whitelisted for + # Google Compute Engine Scanning Alpha access. + FORBIDDEN_TO_SCAN_COMPUTE = 21 + + # User tries to update managed scan + FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43 + + # The supplied filter is malformed. For example, it can not be parsed, does + # not have a filter type in expression, or the same filter type appears + # more than once. + MALFORMED_FILTER = 22 + + # The supplied resource name is malformed (can not be parsed). + MALFORMED_RESOURCE_NAME = 23 + + # The current project is not in an active state. + PROJECT_INACTIVE = 24 + + # A required field is not set. + REQUIRED_FIELD = 25 + + # Project id, scanconfig id, scanrun id, or finding id are not consistent + # with each other in resource name. + RESOURCE_NAME_INCONSISTENT = 26 + + # The scan being requested to start is already running. + SCAN_ALREADY_RUNNING = 27 + + # The scan that was requested to be stopped is not running. + SCAN_NOT_RUNNING = 28 + + # One of the seed URLs does not belong to the current project. + SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29 + + # One of the seed URLs is malformed (can not be parsed). + SEED_URL_MALFORMED = 30 + + # One of the seed URLs is mapped to a non-routable IP address in DNS. + SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31 + + # One of the seed URLs is mapped to an IP address which is not reserved + # for the current project. + SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32 + + # One of the seed URLs has on-routable IP address. + SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33 + + # One of the seed URLs has an IP address that is not reserved + # for the current project. + SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35 + + # The Web Security Scanner service account is not configured under the + # project. + SERVICE_ACCOUNT_NOT_CONFIGURED = 36 + + # A project has reached the maximum number of scans. + TOO_MANY_SCANS = 37 + + # Resolving the details of the current project fails. + UNABLE_TO_RESOLVE_PROJECT_INFO = 38 + + # One or more blacklist patterns were in the wrong format. + UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39 + + # The supplied filter is not supported. + UNSUPPORTED_FILTER = 40 + + # The supplied finding type is not supported. For example, we do not + # provide findings of the given finding type. + UNSUPPORTED_FINDING_TYPE = 41 + + # The URL scheme of one or more of the supplied URLs is not supported. + UNSUPPORTED_URL_SCHEME = 42 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run.rb new file mode 100644 index 000000000000..a7b461044a50 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run.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 WebSecurityScanner + module V1 + # A ScanRun is a output-only resource representing an actual run of the scan. + # Next id: 12 + # @!attribute [rw] name + # @return [::String] + # Output only. The resource name of the ScanRun. The name follows the format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # The ScanRun IDs are generated by the system. + # @!attribute [rw] execution_state + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun::ExecutionState] + # Output only. The execution state of the ScanRun. + # @!attribute [rw] result_state + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun::ResultState] + # Output only. The result state of the ScanRun. This field is only available after the + # execution state reaches "FINISHED". + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the ScanRun started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the ScanRun reached termination state - that the ScanRun + # is either finished or stopped by user. + # @!attribute [rw] urls_crawled_count + # @return [::Integer] + # Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, + # the value represents the number of URLs crawled up to now. + # @!attribute [rw] urls_tested_count + # @return [::Integer] + # Output only. The number of URLs tested during this ScanRun. If the scan is in progress, + # the value represents the number of URLs tested up to now. The number of + # URLs tested is usually larger than the number URLS crawled because + # typically a crawled URL is tested with multiple test payloads. + # @!attribute [rw] has_vulnerabilities + # @return [::Boolean] + # Output only. Whether the scan run has found any vulnerabilities. + # @!attribute [rw] progress_percent + # @return [::Integer] + # Output only. The percentage of total completion ranging from 0 to 100. + # If the scan is in queue, the value is 0. + # If the scan is running, the value ranges from 0 to 100. + # If the scan is finished, the value is 100. + # @!attribute [rw] error_trace + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRunErrorTrace] + # Output only. If result_state is an ERROR, this field provides the primary reason for + # scan's termination and more details, if such are available. + # @!attribute [rw] warning_traces + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::ScanRunWarningTrace>] + # Output only. A list of warnings, if such are encountered during this scan run. + class ScanRun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of ScanRun execution state. + module ExecutionState + # Represents an invalid state caused by internal server error. This value + # should never be returned. + EXECUTION_STATE_UNSPECIFIED = 0 + + # The scan is waiting in the queue. + QUEUED = 1 + + # The scan is in progress. + SCANNING = 2 + + # The scan is either finished or stopped by user. + FINISHED = 3 + end + + # Types of ScanRun result state. + module ResultState + # Default value. This value is returned when the ScanRun is not yet + # finished. + RESULT_STATE_UNSPECIFIED = 0 + + # The scan finished without errors. + SUCCESS = 1 + + # The scan finished with errors. + ERROR = 2 + + # The scan was terminated by user. + KILLED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_error_trace.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_error_trace.rb new file mode 100644 index 000000000000..c5e493b73771 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_error_trace.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 WebSecurityScanner + module V1 + # Output only. + # Defines an error trace message for a ScanRun. + # @!attribute [rw] code + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRunErrorTrace::Code] + # Output only. Indicates the error reason code. + # @!attribute [rw] scan_config_error + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfigError] + # Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + # message encountered during scan configuration validation that is performed + # before each scan run. + # @!attribute [rw] most_common_http_error_code + # @return [::Integer] + # Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + # common HTTP error code, if such is available. For example, if this code is + # 404, the scan has encountered too many NOT_FOUND responses. + class ScanRunErrorTrace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. + # Defines an error reason code. + # Next id: 8 + module Code + # Default value is never used. + CODE_UNSPECIFIED = 0 + + # Indicates that the scan run failed due to an internal server error. + INTERNAL_ERROR = 1 + + # Indicates a scan configuration error, usually due to outdated ScanConfig + # settings, such as starting_urls or the DNS configuration. + SCAN_CONFIG_ISSUE = 2 + + # Indicates an authentication error, usually due to outdated ScanConfig + # authentication settings. + AUTHENTICATION_CONFIG_ISSUE = 3 + + # Indicates a scan operation timeout, usually caused by a very large site. + TIMED_OUT_WHILE_SCANNING = 4 + + # Indicates that a scan encountered excessive redirects, either to + # authentication or some other page outside of the scan scope. + TOO_MANY_REDIRECTS = 5 + + # Indicates that a scan encountered numerous errors from the web site + # pages. When available, most_common_http_error_code field indicates the + # most common HTTP error code encountered during the scan. + TOO_MANY_HTTP_ERRORS = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_log.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_log.rb new file mode 100644 index 000000000000..dcf836b52240 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_log.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1 + # A ScanRunLog is an output-only proto used for Stackdriver customer logging. + # It is used for logs covering the start and end of scan pipelines. + # Other than an added summary, this is a subset of the ScanRun. + # Representation in logs is either a proto Struct, or converted to JSON. + # Next id: 9 + # @!attribute [rw] summary + # @return [::String] + # Human friendly message about the event. + # @!attribute [rw] name + # @return [::String] + # The resource name of the ScanRun being logged. + # @!attribute [rw] execution_state + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun::ExecutionState] + # The execution state of the ScanRun. + # @!attribute [rw] result_state + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun::ResultState] + # The result state of the ScanRun. + # @!attribute [rw] urls_crawled_count + # @return [::Integer] + # @!attribute [rw] urls_tested_count + # @return [::Integer] + # @!attribute [rw] has_findings + # @return [::Boolean] + # @!attribute [rw] error_trace + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRunErrorTrace] + class ScanRunLog + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_warning_trace.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_warning_trace.rb new file mode 100644 index 000000000000..c6d38093f5ee --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_warning_trace.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1 + # Output only. + # Defines a warning trace message for ScanRun. Warning traces provide customers + # with useful information that helps make the scanning process more effective. + # @!attribute [rw] code + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRunWarningTrace::Code] + # Output only. Indicates the warning code. + class ScanRunWarningTrace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. + # Defines a warning message code. + # Next id: 6 + module Code + # Default value is never used. + CODE_UNSPECIFIED = 0 + + # Indicates that a scan discovered an unexpectedly low number of URLs. This + # is sometimes caused by complex navigation features or by using a single + # URL for numerous pages. + INSUFFICIENT_CRAWL_RESULTS = 1 + + # Indicates that a scan discovered too many URLs to test, or excessive + # redundant URLs. + TOO_MANY_CRAWL_RESULTS = 2 + + # Indicates that too many tests have been generated for the scan. Customer + # should try reducing the number of starting URLs, increasing the QPS rate, + # or narrowing down the scope of the scan using the excluded patterns. + TOO_MANY_FUZZ_TASKS = 3 + + # Indicates that a scan is blocked by IAP. + BLOCKED_BY_IAP = 4 + + # Indicates that no seeds is found for a scan + NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN = 5 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/web_security_scanner.rb new file mode 100644 index 000000000000..218897aed41e --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/web_security_scanner.rb @@ -0,0 +1,278 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1 + # Request for the `CreateScanConfig` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name where the scan is created, which should be a + # project resource name in the format 'projects/\\{projectId}'. + # @!attribute [rw] scan_config + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # Required. The ScanConfig to be created. + class CreateScanConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteScanConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanConfig to be deleted. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + class DeleteScanConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetScanConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanConfig to be returned. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + class GetScanConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListScanConfigs` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a project resource name in the + # format 'projects/\\{projectId}'. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of ScanConfigs to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + class ListScanConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateScanConfigRequest` method. + # @!attribute [rw] scan_config + # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] + # Required. The ScanConfig to be updated. The name field must be set to identify the + # resource to be updated. The values of fields not covered by the mask + # will be ignored. + # @!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 UpdateScanConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListScanConfigs` method. + # @!attribute [rw] scan_configs + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] + # The list of ScanConfigs returned. + # @!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 ListScanConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `StartScanRun` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanConfig to be used. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + class StartScanRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetScanRun` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanRun to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + class GetScanRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListScanRuns` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a scan resource name in the + # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of ScanRuns to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + class ListScanRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListScanRuns` method. + # @!attribute [rw] scan_runs + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] + # The list of ScanRuns returned. + # @!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 ListScanRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `StopScanRun` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanRun to be stopped. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + class StopScanRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListCrawledUrls` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of CrawledUrls to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + class ListCrawledUrlsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListCrawledUrls` method. + # @!attribute [rw] crawled_urls + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] + # The list of CrawledUrls returned. + # @!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 ListCrawledUrlsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetFinding` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Finding to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. + class GetFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListFindings` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @!attribute [rw] filter + # @return [::String] + # The filter expression. The expression must be in the format: + # . + # Supported field: 'finding_type'. + # Supported operator: '='. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of Findings to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + class ListFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListFindings` method. + # @!attribute [rw] findings + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::Finding>] + # The list of Findings returned. + # @!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 ListFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListFindingTypeStats` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + class ListFindingTypeStatsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListFindingTypeStats` method. + # @!attribute [rw] finding_type_stats + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::FindingTypeStats>] + # The list of FindingTypeStats returned. + class ListFindingTypeStatsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/Gemfile new file mode 100644 index 000000000000..9c79128c7f82 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1", path: "../" +else + gem "google-cloud-web_security_scanner-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-web_security_scanner-v1/snippets/snippet_metadata_google.cloud.websecurityscanner.v1.json b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/snippet_metadata_google.cloud.websecurityscanner.v1.json new file mode 100644 index 000000000000..ff90b544b895 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/snippet_metadata_google.cloud.websecurityscanner.v1.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-cloud-web_security_scanner-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.websecurityscanner.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_CreateScanConfig_sync", + "title": "Snippet for the create_scan_config call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#create_scan_config.", + "file": "web_security_scanner/create_scan_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_scan_config", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#create_scan_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanConfig", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "CreateScanConfig", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.CreateScanConfig", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_DeleteScanConfig_sync", + "title": "Snippet for the delete_scan_config call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#delete_scan_config.", + "file": "web_security_scanner/delete_scan_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_scan_config", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#delete_scan_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "DeleteScanConfig", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.DeleteScanConfig", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_GetScanConfig_sync", + "title": "Snippet for the get_scan_config call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_config.", + "file": "web_security_scanner/get_scan_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scan_config", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanConfig", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "GetScanConfig", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.GetScanConfig", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListScanConfigs_sync", + "title": "Snippet for the list_scan_configs call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_configs.", + "file": "web_security_scanner/list_scan_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scan_configs", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListScanConfigs", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListScanConfigs", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_UpdateScanConfig_sync", + "title": "Snippet for the update_scan_config call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#update_scan_config.", + "file": "web_security_scanner/update_scan_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_scan_config", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#update_scan_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanConfig", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "UpdateScanConfig", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.UpdateScanConfig", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_StartScanRun_sync", + "title": "Snippet for the start_scan_run call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#start_scan_run.", + "file": "web_security_scanner/start_scan_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_scan_run", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#start_scan_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanRun", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "StartScanRun", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.StartScanRun", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_GetScanRun_sync", + "title": "Snippet for the get_scan_run call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_run.", + "file": "web_security_scanner/get_scan_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scan_run", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanRun", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "GetScanRun", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.GetScanRun", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_sync", + "title": "Snippet for the list_scan_runs call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_runs.", + "file": "web_security_scanner/list_scan_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scan_runs", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListScanRuns", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListScanRuns", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_StopScanRun_sync", + "title": "Snippet for the stop_scan_run call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#stop_scan_run.", + "file": "web_security_scanner/stop_scan_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "stop_scan_run", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#stop_scan_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanRun", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "StopScanRun", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.StopScanRun", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_sync", + "title": "Snippet for the list_crawled_urls call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_crawled_urls.", + "file": "web_security_scanner/list_crawled_urls.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_crawled_urls", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_crawled_urls", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListCrawledUrls", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListCrawledUrls", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_GetFinding_sync", + "title": "Snippet for the get_finding call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_finding.", + "file": "web_security_scanner/get_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_finding", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::Finding", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "GetFinding", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.GetFinding", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListFindings_sync", + "title": "Snippet for the list_findings call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_findings.", + "file": "web_security_scanner/list_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_findings", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListFindings", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListFindings", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListFindingTypeStats_sync", + "title": "Snippet for the list_finding_type_stats call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_finding_type_stats.", + "file": "web_security_scanner/list_finding_type_stats.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_finding_type_stats", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_finding_type_stats", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListFindingTypeStats", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListFindingTypeStats", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" + } + } + }, + "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-web_security_scanner-v1/snippets/web_security_scanner/create_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/create_scan_config.rb new file mode 100644 index 000000000000..3411dbe3c686 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/create_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_CreateScanConfig_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the create_scan_config call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#create_scan_config. +# +def create_scan_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new + + # Call the create_scan_config method. + result = client.create_scan_config request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. + p result +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_CreateScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/delete_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/delete_scan_config.rb new file mode 100644 index 000000000000..3c3c38833327 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/delete_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_DeleteScanConfig_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the delete_scan_config call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#delete_scan_config. +# +def delete_scan_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new + + # Call the delete_scan_config method. + result = client.delete_scan_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_DeleteScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_finding.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_finding.rb new file mode 100644 index 000000000000..7264a0da4ec4 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START websecurityscanner_v1_generated_WebSecurityScanner_GetFinding_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the get_finding call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_finding. +# +def get_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new + + # Call the get_finding method. + result = client.get_finding request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1::Finding. + p result +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_GetFinding_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_config.rb new file mode 100644 index 000000000000..e98d311e44c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_GetScanConfig_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the get_scan_config call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_config. +# +def get_scan_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new + + # Call the get_scan_config method. + result = client.get_scan_config request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. + p result +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_GetScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_run.rb new file mode 100644 index 000000000000..81e3f63c8ea6 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_GetScanRun_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the get_scan_run call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_run. +# +def get_scan_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new + + # Call the get_scan_run method. + result = client.get_scan_run request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. + p result +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_GetScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_crawled_urls.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_crawled_urls.rb new file mode 100644 index 000000000000..c168ec342ee5 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_crawled_urls.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the list_crawled_urls call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_crawled_urls. +# +def list_crawled_urls + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new + + # Call the list_crawled_urls method. + result = client.list_crawled_urls request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::CrawledUrl. + p item + end +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_finding_type_stats.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_finding_type_stats.rb new file mode 100644 index 000000000000..b86e8985075e --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_finding_type_stats.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START websecurityscanner_v1_generated_WebSecurityScanner_ListFindingTypeStats_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the list_finding_type_stats call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_finding_type_stats. +# +def list_finding_type_stats + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new + + # Call the list_finding_type_stats method. + result = client.list_finding_type_stats request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse. + p result +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_ListFindingTypeStats_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_findings.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_findings.rb new file mode 100644 index 000000000000..cfc4dc3cb5fb --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START websecurityscanner_v1_generated_WebSecurityScanner_ListFindings_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the list_findings call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_findings. +# +def list_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new + + # Call the list_findings method. + result = client.list_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::Finding. + p item + end +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_configs.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_configs.rb new file mode 100644 index 000000000000..fa3fbb15c6b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_ListScanConfigs_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the list_scan_configs call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_configs. +# +def list_scan_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new + + # Call the list_scan_configs method. + result = client.list_scan_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::WebSecurityScanner::V1::ScanConfig. + p item + end +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_ListScanConfigs_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_runs.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_runs.rb new file mode 100644 index 000000000000..57fa3759c1f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the list_scan_runs call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_runs. +# +def list_scan_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new + + # Call the list_scan_runs method. + result = client.list_scan_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::WebSecurityScanner::V1::ScanRun. + p item + end +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/start_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/start_scan_run.rb new file mode 100644 index 000000000000..4ec4ae4d692e --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/start_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_StartScanRun_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the start_scan_run call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#start_scan_run. +# +def start_scan_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new + + # Call the start_scan_run method. + result = client.start_scan_run request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. + p result +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_StartScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/stop_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/stop_scan_run.rb new file mode 100644 index 000000000000..4c9a5b9df3ef --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/stop_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_StopScanRun_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the stop_scan_run call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#stop_scan_run. +# +def stop_scan_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new + + # Call the stop_scan_run method. + result = client.stop_scan_run request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. + p result +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_StopScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/update_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/update_scan_config.rb new file mode 100644 index 000000000000..69d927b6d8f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/update_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_UpdateScanConfig_sync] +require "google/cloud/web_security_scanner/v1" + +## +# Snippet for the update_scan_config call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#update_scan_config. +# +def update_scan_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new + + # Call the update_scan_config method. + result = client.update_scan_config request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. + p result +end +# [END websecurityscanner_v1_generated_WebSecurityScanner_UpdateScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_rest_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_rest_test.rb new file mode 100644 index 000000000000..53d4f0c97247 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_rest_test.rb @@ -0,0 +1,812 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/websecurityscanner/v1/web_security_scanner_pb" +require "google/cloud/web_security_scanner/v1/web_security_scanner/rest" + + +class ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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_scan_config + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scan_config = {} + + create_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_create_scan_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_scan_config({ parent: parent, scan_config: scan_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_scan_config parent: parent, scan_config: scan_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_scan_config ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_scan_config({ parent: parent, scan_config: scan_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_scan_config(::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_scan_config_client_stub.call_count + end + end + end + + def test_delete_scan_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_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_delete_scan_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_scan_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_scan_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_scan_config ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_scan_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_scan_config(::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_scan_config_client_stub.call_count + end + end + end + + def test_get_scan_config + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_scan_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scan_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scan_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scan_config ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scan_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scan_config(::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scan_config_client_stub.call_count + end + end + end + + def test_list_scan_configs + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse.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_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_scan_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scan_configs_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scan_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scan_configs ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_scan_configs(::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.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_scan_configs_client_stub.call_count + end + end + end + + def test_update_scan_config + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scan_config = {} + update_mask = {} + + update_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_update_scan_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_scan_config scan_config: scan_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_scan_config ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new(scan_config: scan_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_scan_config(::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new(scan_config: scan_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_scan_config_client_stub.call_count + end + end + end + + def test_start_scan_run + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + start_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_start_scan_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_scan_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_scan_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_scan_run ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_scan_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_scan_run(::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_scan_run_client_stub.call_count + end + end + end + + def test_get_scan_run + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_scan_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scan_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scan_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scan_run ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scan_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scan_run(::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scan_run_client_stub.call_count + end + end + end + + def test_list_scan_runs + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse.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_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_scan_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scan_runs_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scan_runs parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scan_runs ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_scan_runs(::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.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_scan_runs_client_stub.call_count + end + end + end + + def test_stop_scan_run + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + stop_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_stop_scan_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stop_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.stop_scan_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.stop_scan_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.stop_scan_run ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.stop_scan_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.stop_scan_run(::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, stop_scan_run_client_stub.call_count + end + end + end + + def test_list_crawled_urls + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse.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_crawled_urls_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_crawled_urls_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_crawled_urls_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_crawled_urls parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_crawled_urls ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_crawled_urls(::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.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_crawled_urls_client_stub.call_count + end + end + end + + def test_get_finding + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_finding_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_finding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_finding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_finding ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_finding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_finding(::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_finding_client_stub.call_count + end + end + end + + def test_list_findings + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_findings parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_findings ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_findings(::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_count + end + end + end + + def test_list_finding_type_stats + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_finding_type_stats_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_finding_type_stats_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_finding_type_stats_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_finding_type_stats({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_finding_type_stats parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_finding_type_stats ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_finding_type_stats({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_finding_type_stats(::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_finding_type_stats_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::WebSecurityScanner::V1::WebSecurityScanner::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::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_test.rb new file mode 100644 index 000000000000..c27970e14144 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_test.rb @@ -0,0 +1,900 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/websecurityscanner/v1/web_security_scanner_pb" +require "google/cloud/web_security_scanner/v1/web_security_scanner" + +class ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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_scan_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scan_config = {} + + create_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_scan_config, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebSecurityScanner::V1::ScanConfig), request["scan_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_scan_config({ parent: parent, scan_config: scan_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_scan_config parent: parent, scan_config: scan_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_scan_config ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_scan_config({ parent: parent, scan_config: scan_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_scan_config(::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_scan_config_client_stub.call_rpc_count + end + end + + def test_delete_scan_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_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_scan_config, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_scan_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_scan_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_scan_config ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_scan_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_scan_config(::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new(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_scan_config_client_stub.call_rpc_count + end + end + + def test_get_scan_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scan_config, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scan_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scan_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scan_config ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scan_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scan_config(::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_scan_config_client_stub.call_rpc_count + end + end + + def test_list_scan_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_scan_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scan_configs, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest, 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_scan_configs_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_scan_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_scan_configs ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_scan_configs(::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.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_scan_configs_client_stub.call_rpc_count + end + end + + def test_update_scan_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scan_config = {} + update_mask = {} + + update_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_scan_config, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebSecurityScanner::V1::ScanConfig), request["scan_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_scan_config scan_config: scan_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_scan_config ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new(scan_config: scan_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_scan_config({ scan_config: scan_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 + client.update_scan_config(::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new(scan_config: scan_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_scan_config_client_stub.call_rpc_count + end + end + + def test_start_scan_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_scan_run, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_scan_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_scan_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_scan_run ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_scan_run({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_scan_run(::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new(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_scan_run_client_stub.call_rpc_count + end + end + + def test_get_scan_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scan_run, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scan_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scan_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scan_run ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scan_run({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scan_run(::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_scan_run_client_stub.call_rpc_count + end + end + + def test_list_scan_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_scan_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scan_runs, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest, 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_scan_runs_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_scan_runs parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_scan_runs ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_scan_runs(::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.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_scan_runs_client_stub.call_rpc_count + end + end + + def test_stop_scan_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :stop_scan_run, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stop_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stop_scan_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.stop_scan_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.stop_scan_run ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.stop_scan_run({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.stop_scan_run(::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, stop_scan_run_client_stub.call_rpc_count + end + end + + def test_list_crawled_urls + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_crawled_urls_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_crawled_urls, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest, 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_crawled_urls_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_crawled_urls parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_crawled_urls ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_crawled_urls(::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.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_crawled_urls_client_stub.call_rpc_count + end + end + + def test_get_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_finding, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_finding_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_finding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_finding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_finding ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_finding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_finding(::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_finding_client_stub.call_rpc_count + end + end + + def test_list_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_findings, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_findings_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_findings parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_findings ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_findings(::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_rpc_count + end + end + + def test_list_finding_type_stats + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_finding_type_stats_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_finding_type_stats, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_finding_type_stats_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_finding_type_stats({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_finding_type_stats parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_finding_type_stats ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_finding_type_stats({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_finding_type_stats(::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_finding_type_stats_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::WebSecurityScanner::V1::WebSecurityScanner::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::WebSecurityScanner::V1::WebSecurityScanner::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::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/test/helper.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..080aad677a51 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "websecurityscanner.googleapis.com", + "api_shortname": "websecurityscanner", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1beta/latest", + "distribution_name": "google-cloud-web_security_scanner-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "websecurityscanner", + "name_pretty": "Web Security Scanner V1beta API", + "product_documentation": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. Note that google-cloud-web_security_scanner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_security_scanner instead. See the readme for more details.", + "ruby-cloud-env-prefix": "WEB_SECURITY_SCANNER", + "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.rubocop.yml new file mode 100644 index 000000000000..e051a212551a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-web_security_scanner-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-web_security_scanner-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.toys.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/.yardopts b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.yardopts new file mode 100644 index 000000000000..a098711b250d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Web Security Scanner 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-web_security_scanner-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..e955035f32bf --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-web_security_scanner-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-web_security_scanner-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/web_security_scanner/v1beta" + +client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/web_security_scanner/v1beta" + +::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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-web_security_scanner-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/web_security_scanner/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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-web_security_scanner-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/README.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/README.md new file mode 100644 index 000000000000..a908e25d8d6d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Web Security Scanner V1beta API + +Scans your Compute and App Engine apps for common web vulnerabilities. + +Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Web Security Scanner V1beta API. Most users should consider using +the main client gem, +[google-cloud-web_security_scanner](https://rubygems.org/gems/google-cloud-web_security_scanner). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-web_security_scanner-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/websecurityscanner.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/web_security_scanner/v1beta" + +client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new +request = ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new # (request fields as keyword arguments...) +response = client.create_scan_config request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-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/web_security_scanner/v1beta" +require "logger" + +client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-web_security_scanner`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-web_security_scanner-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-web_security_scanner`. +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-web_security_scanner-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-web_security_scanner-v1beta/Rakefile b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Rakefile new file mode 100644 index 000000000000..32e97681638d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WEB_SECURITY_SCANNER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WEB_SECURITY_SCANNER_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 WEB_SECURITY_SCANNER_TEST_PROJECT=test123 WEB_SECURITY_SCANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials" + ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WEB_SECURITY_SCANNER_PROJECT"] = project + ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] = project + ENV["WEB_SECURITY_SCANNER_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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-web_security_scanner-v1beta" + header "google-cloud-web_security_scanner-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-web_security_scanner-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-web_security_scanner-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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..c625db81d1c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/gapic_metadata.json @@ -0,0 +1,83 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.websecurityscanner.v1beta", + "libraryPackage": "::Google::Cloud::WebSecurityScanner::V1beta", + "services": { + "WebSecurityScanner": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client", + "rpcs": { + "CreateScanConfig": { + "methods": [ + "create_scan_config" + ] + }, + "DeleteScanConfig": { + "methods": [ + "delete_scan_config" + ] + }, + "GetScanConfig": { + "methods": [ + "get_scan_config" + ] + }, + "ListScanConfigs": { + "methods": [ + "list_scan_configs" + ] + }, + "UpdateScanConfig": { + "methods": [ + "update_scan_config" + ] + }, + "StartScanRun": { + "methods": [ + "start_scan_run" + ] + }, + "GetScanRun": { + "methods": [ + "get_scan_run" + ] + }, + "ListScanRuns": { + "methods": [ + "list_scan_runs" + ] + }, + "StopScanRun": { + "methods": [ + "stop_scan_run" + ] + }, + "ListCrawledUrls": { + "methods": [ + "list_crawled_urls" + ] + }, + "GetFinding": { + "methods": [ + "get_finding" + ] + }, + "ListFindings": { + "methods": [ + "list_findings" + ] + }, + "ListFindingTypeStats": { + "methods": [ + "list_finding_type_stats" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/google-cloud-web_security_scanner-v1beta.gemspec b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/google-cloud-web_security_scanner-v1beta.gemspec new file mode 100644 index 000000000000..46d14b4a6be3 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/google-cloud-web_security_scanner-v1beta.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/web_security_scanner/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-web_security_scanner-v1beta" + gem.version = Google::Cloud::WebSecurityScanner::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. Note that google-cloud-web_security_scanner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_security_scanner instead. See the readme for more details." + gem.summary = "Scans your Compute and App Engine apps for common web vulnerabilities." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb new file mode 100644 index 000000000000..aa99555f2dd3 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-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/web_security_scanner/v1beta" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb new file mode 100644 index 000000000000..42ef3ae8aa7c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/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/web_security_scanner/v1beta/web_security_scanner" +require "google/cloud/web_security_scanner/v1beta/version" + +module Google + module Cloud + module WebSecurityScanner + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/web_security_scanner/v1beta" + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/web_security_scanner/v1beta" + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + module V1beta + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/web_security_scanner/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb new file mode 100644 index 000000000000..3c7b745ca0ac --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" +require "google/cloud/web_security_scanner/v1beta/version" + +module Google + module Cloud + module WebSecurityScanner + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/web_security_scanner/v1beta/rest" + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + module V1beta + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/version.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/version.rb new file mode 100644 index 000000000000..f0209dccfca1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/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 WebSecurityScanner + module V1beta + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb new file mode 100644 index 000000000000..e4d014ad6c61 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.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/web_security_scanner/v1beta/version" + +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/paths" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/client" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" + +module Google + module Cloud + module WebSecurityScanner + module V1beta + ## + # Cloud Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud Platform. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/web_security_scanner/v1beta/web_security_scanner" + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + module WebSecurityScanner + end + end + end + end +end + +helper_path = ::File.join __dir__, "web_security_scanner", "helpers.rb" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb new file mode 100644 index 000000000000..05285d2d540c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb @@ -0,0 +1,1721 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/websecurityscanner/v1beta/web_security_scanner_pb" + +module Google + module Cloud + module WebSecurityScanner + module V1beta + module WebSecurityScanner + ## + # Client for the WebSecurityScanner service. + # + # Cloud Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud Platform. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "websecurityscanner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :web_security_scanner_stub + + ## + # Configure the WebSecurityScanner Client class. + # + # See {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WebSecurityScanner clients + # ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "WebSecurityScanner", "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_scan_config.timeout = 600.0 + + default_config.rpcs.delete_scan_config.timeout = 600.0 + default_config.rpcs.delete_scan_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_scan_config.timeout = 600.0 + default_config.rpcs.get_scan_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_scan_configs.timeout = 600.0 + default_config.rpcs.list_scan_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_scan_config.timeout = 600.0 + + default_config.rpcs.start_scan_run.timeout = 600.0 + + default_config.rpcs.get_scan_run.timeout = 600.0 + default_config.rpcs.get_scan_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_scan_runs.timeout = 600.0 + default_config.rpcs.list_scan_runs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.stop_scan_run.timeout = 600.0 + + default_config.rpcs.list_crawled_urls.timeout = 600.0 + default_config.rpcs.list_crawled_urls.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_finding.timeout = 600.0 + default_config.rpcs.get_finding.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 600.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_finding_type_stats.timeout = 600.0 + default_config.rpcs.list_finding_type_stats.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 WebSecurityScanner Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @web_security_scanner_stub.universe_domain + end + + ## + # Create a new WebSecurityScanner client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WebSecurityScanner 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/websecurityscanner/v1beta/web_security_scanner_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 + + @web_security_scanner_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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 + ) + + @web_security_scanner_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 + @web_security_scanner_stub.logger + end + + # Service calls + + ## + # Creates a new ScanConfig. + # + # @overload create_scan_config(request, options = nil) + # Pass arguments to `create_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_scan_config(parent: nil, scan_config: nil) + # Pass arguments to `create_scan_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name where the scan is created, which should be a + # project resource name in the format 'projects/\\{projectId}'. + # @param scan_config [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash] + # Required. The ScanConfig to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new + # + # # Call the create_scan_config method. + # result = client.create_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. + # p result + # + def create_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_scan_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::WebSecurityScanner::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_scan_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :create_scan_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing ScanConfig and its child resources. + # + # @overload delete_scan_config(request, options = nil) + # Pass arguments to `delete_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_scan_config(name: nil) + # Pass arguments to `delete_scan_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 resource name of the ScanConfig to be deleted. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Protobuf::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/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new + # + # # Call the delete_scan_config method. + # result = client.delete_scan_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_scan_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::WebSecurityScanner::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_scan_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :delete_scan_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ScanConfig. + # + # @overload get_scan_config(request, options = nil) + # Pass arguments to `get_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_scan_config(name: nil) + # Pass arguments to `get_scan_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 resource name of the ScanConfig to be returned. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new + # + # # Call the get_scan_config method. + # result = client.get_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. + # p result + # + def get_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_scan_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::WebSecurityScanner::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_scan_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :get_scan_config, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists ScanConfigs under a given project. + # + # @overload list_scan_configs(request, options = nil) + # Pass arguments to `list_scan_configs` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_scan_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_scan_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, which should be a project resource name in the + # format 'projects/\\{projectId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of ScanConfigs to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new + # + # # Call the list_scan_configs method. + # result = client.list_scan_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::WebSecurityScanner::V1beta::ScanConfig. + # p item + # end + # + def list_scan_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_scan_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::WebSecurityScanner::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_scan_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scan_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_scan_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a ScanConfig. This method support partial update of a ScanConfig. + # + # @overload update_scan_config(request, options = nil) + # Pass arguments to `update_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_scan_config(scan_config: nil, update_mask: nil) + # Pass arguments to `update_scan_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 scan_config [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash] + # Required. The ScanConfig to be updated. The name field must be set to identify the + # resource to be updated. The values of fields not covered by the mask + # will be ignored. + # @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::WebSecurityScanner::V1beta::ScanConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new + # + # # Call the update_scan_config method. + # result = client.update_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. + # p result + # + def update_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_scan_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::WebSecurityScanner::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.scan_config&.name + header_params["scan_config.name"] = request.scan_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_scan_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :update_scan_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 + + ## + # Start a ScanRun according to the given ScanConfig. + # + # @overload start_scan_run(request, options = nil) + # Pass arguments to `start_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scan_run(name: nil) + # Pass arguments to `start_scan_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 resource name of the ScanConfig to be used. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new + # + # # Call the start_scan_run method. + # result = client.start_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. + # p result + # + def start_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest + + # Converts hash and nil to 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_scan_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::WebSecurityScanner::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.start_scan_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :start_scan_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 + + ## + # Gets a ScanRun. + # + # @overload get_scan_run(request, options = nil) + # Pass arguments to `get_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_scan_run(name: nil) + # Pass arguments to `get_scan_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 resource name of the ScanRun to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new + # + # # Call the get_scan_run method. + # result = client.get_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. + # p result + # + def get_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_scan_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::WebSecurityScanner::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_scan_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :get_scan_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 + + ## + # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + # stop time. + # + # @overload list_scan_runs(request, options = nil) + # Pass arguments to `list_scan_runs` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_scan_runs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_scan_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. The parent resource name, which should be a scan resource name in the + # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of ScanRuns to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new + # + # # Call the list_scan_runs method. + # result = client.list_scan_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::WebSecurityScanner::V1beta::ScanRun. + # p item + # end + # + def list_scan_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_scan_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::WebSecurityScanner::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_scan_runs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_scan_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_scan_runs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_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 + + ## + # Stops a ScanRun. The stopped ScanRun is returned. + # + # @overload stop_scan_run(request, options = nil) + # Pass arguments to `stop_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scan_run(name: nil) + # Pass arguments to `stop_scan_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 resource name of the ScanRun to be stopped. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new + # + # # Call the stop_scan_run method. + # result = client.stop_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. + # p result + # + def stop_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest + + # Converts hash and nil to 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_scan_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::WebSecurityScanner::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.stop_scan_run.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stop_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :stop_scan_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 + + ## + # List CrawledUrls under a given ScanRun. + # + # @overload list_crawled_urls(request, options = nil) + # Pass arguments to `list_crawled_urls` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_crawled_urls(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_crawled_urls` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of CrawledUrls to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new + # + # # Call the list_crawled_urls method. + # result = client.list_crawled_urls request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl. + # p item + # end + # + def list_crawled_urls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_crawled_urls.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::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_crawled_urls.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_crawled_urls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_crawled_urls, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, request, response, 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 Finding. + # + # @overload get_finding(request, options = nil) + # Pass arguments to `get_finding` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_finding(name: nil) + # Pass arguments to `get_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Finding to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::Finding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::Finding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new + # + # # Call the get_finding method. + # result = client.get_finding request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::Finding. + # p result + # + def get_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::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_finding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :get_finding, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List Findings under a given ScanRun. + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @param filter [::String] + # Required. The filter expression. The expression must be in the format: + # . + # Supported field: 'finding_type'. + # Supported operator: '='. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of Findings to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::Finding. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::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_findings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_findings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_findings, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List all FindingTypeStats under a given ScanRun. + # + # @overload list_finding_type_stats(request, options = nil) + # Pass arguments to `list_finding_type_stats` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_finding_type_stats(parent: nil) + # Pass arguments to `list_finding_type_stats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new + # + # # Call the list_finding_type_stats method. + # result = client.list_finding_type_stats request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse. + # p result + # + def list_finding_type_stats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_finding_type_stats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::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_finding_type_stats.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_finding_type_stats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.call_rpc :list_finding_type_stats, request, 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 WebSecurityScanner API. + # + # This class represents the configuration for WebSecurityScanner, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_scan_config to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_scan_config.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_scan_config.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "websecurityscanner.googleapis.com" + + config_attr :endpoint, nil, ::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 WebSecurityScanner API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scan_config + ## + # RPC-specific configuration for `delete_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scan_config + ## + # RPC-specific configuration for `get_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scan_config + ## + # RPC-specific configuration for `list_scan_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scan_configs + ## + # RPC-specific configuration for `update_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scan_config + ## + # RPC-specific configuration for `start_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :start_scan_run + ## + # RPC-specific configuration for `get_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scan_run + ## + # RPC-specific configuration for `list_scan_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scan_runs + ## + # RPC-specific configuration for `stop_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_scan_run + ## + # RPC-specific configuration for `list_crawled_urls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_crawled_urls + ## + # RPC-specific configuration for `get_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_finding + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_finding_type_stats` + # @return [::Gapic::Config::Method] + # + attr_reader :list_finding_type_stats + + # @private + def initialize parent_rpcs = nil + create_scan_config_config = parent_rpcs.create_scan_config if parent_rpcs.respond_to? :create_scan_config + @create_scan_config = ::Gapic::Config::Method.new create_scan_config_config + delete_scan_config_config = parent_rpcs.delete_scan_config if parent_rpcs.respond_to? :delete_scan_config + @delete_scan_config = ::Gapic::Config::Method.new delete_scan_config_config + get_scan_config_config = parent_rpcs.get_scan_config if parent_rpcs.respond_to? :get_scan_config + @get_scan_config = ::Gapic::Config::Method.new get_scan_config_config + list_scan_configs_config = parent_rpcs.list_scan_configs if parent_rpcs.respond_to? :list_scan_configs + @list_scan_configs = ::Gapic::Config::Method.new list_scan_configs_config + update_scan_config_config = parent_rpcs.update_scan_config if parent_rpcs.respond_to? :update_scan_config + @update_scan_config = ::Gapic::Config::Method.new update_scan_config_config + start_scan_run_config = parent_rpcs.start_scan_run if parent_rpcs.respond_to? :start_scan_run + @start_scan_run = ::Gapic::Config::Method.new start_scan_run_config + get_scan_run_config = parent_rpcs.get_scan_run if parent_rpcs.respond_to? :get_scan_run + @get_scan_run = ::Gapic::Config::Method.new get_scan_run_config + list_scan_runs_config = parent_rpcs.list_scan_runs if parent_rpcs.respond_to? :list_scan_runs + @list_scan_runs = ::Gapic::Config::Method.new list_scan_runs_config + stop_scan_run_config = parent_rpcs.stop_scan_run if parent_rpcs.respond_to? :stop_scan_run + @stop_scan_run = ::Gapic::Config::Method.new stop_scan_run_config + list_crawled_urls_config = parent_rpcs.list_crawled_urls if parent_rpcs.respond_to? :list_crawled_urls + @list_crawled_urls = ::Gapic::Config::Method.new list_crawled_urls_config + get_finding_config = parent_rpcs.get_finding if parent_rpcs.respond_to? :get_finding + @get_finding = ::Gapic::Config::Method.new get_finding_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_finding_type_stats_config = parent_rpcs.list_finding_type_stats if parent_rpcs.respond_to? :list_finding_type_stats + @list_finding_type_stats = ::Gapic::Config::Method.new list_finding_type_stats_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb new file mode 100644 index 000000000000..9237239dac26 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/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 WebSecurityScanner + module V1beta + module WebSecurityScanner + # Credentials for the WebSecurityScanner API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "WEB_SECURITY_SCANNER_CREDENTIALS", + "WEB_SECURITY_SCANNER_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "WEB_SECURITY_SCANNER_CREDENTIALS_JSON", + "WEB_SECURITY_SCANNER_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-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb new file mode 100644 index 000000000000..035cb9ea1502 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb @@ -0,0 +1,104 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1beta + module WebSecurityScanner + # Path helper methods for the WebSecurityScanner API. + module Paths + ## + # Create a fully-qualified Finding resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}` + # + # @param project [String] + # @param scan_config [String] + # @param scan_run [String] + # @param finding [String] + # + # @return [::String] + def finding_path project:, scan_config:, scan_run:, finding: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "scan_config cannot contain /" if scan_config.to_s.include? "/" + raise ::ArgumentError, "scan_run cannot contain /" if scan_run.to_s.include? "/" + + "projects/#{project}/scanConfigs/#{scan_config}/scanRuns/#{scan_run}/findings/#{finding}" + 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 ScanConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/scanConfigs/{scan_config}` + # + # @param project [String] + # @param scan_config [String] + # + # @return [::String] + def scan_config_path project:, scan_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/scanConfigs/#{scan_config}" + end + + ## + # Create a fully-qualified ScanRun resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}` + # + # @param project [String] + # @param scan_config [String] + # @param scan_run [String] + # + # @return [::String] + def scan_run_path project:, scan_config:, scan_run: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "scan_config cannot contain /" if scan_config.to_s.include? "/" + + "projects/#{project}/scanConfigs/#{scan_config}/scanRuns/#{scan_run}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb new file mode 100644 index 000000000000..cc7e1c7d1fdd --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/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/web_security_scanner/v1beta/version" + +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/paths" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client" + +module Google + module Cloud + module WebSecurityScanner + module V1beta + ## + # Cloud Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud Platform. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + module WebSecurityScanner + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb new file mode 100644 index 000000000000..ffa4a9d484b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb @@ -0,0 +1,1587 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/websecurityscanner/v1beta/web_security_scanner_pb" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub" + +module Google + module Cloud + module WebSecurityScanner + module V1beta + module WebSecurityScanner + module Rest + ## + # REST client for the WebSecurityScanner service. + # + # Cloud Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud Platform. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "websecurityscanner.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :web_security_scanner_stub + + ## + # Configure the WebSecurityScanner Client class. + # + # See {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all WebSecurityScanner clients + # ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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", "WebSecurityScanner", "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_scan_config.timeout = 600.0 + + default_config.rpcs.delete_scan_config.timeout = 600.0 + default_config.rpcs.delete_scan_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_scan_config.timeout = 600.0 + default_config.rpcs.get_scan_config.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_scan_configs.timeout = 600.0 + default_config.rpcs.list_scan_configs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.update_scan_config.timeout = 600.0 + + default_config.rpcs.start_scan_run.timeout = 600.0 + + default_config.rpcs.get_scan_run.timeout = 600.0 + default_config.rpcs.get_scan_run.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_scan_runs.timeout = 600.0 + default_config.rpcs.list_scan_runs.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.stop_scan_run.timeout = 600.0 + + default_config.rpcs.list_crawled_urls.timeout = 600.0 + default_config.rpcs.list_crawled_urls.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.get_finding.timeout = 600.0 + default_config.rpcs.get_finding.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_findings.timeout = 600.0 + default_config.rpcs.list_findings.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] + } + + default_config.rpcs.list_finding_type_stats.timeout = 600.0 + default_config.rpcs.list_finding_type_stats.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 WebSecurityScanner Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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 + @web_security_scanner_stub.universe_domain + end + + ## + # Create a new WebSecurityScanner REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the WebSecurityScanner 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 + + @web_security_scanner_stub = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @web_security_scanner_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 + @web_security_scanner_stub.logger + end + + # Service calls + + ## + # Creates a new ScanConfig. + # + # @overload create_scan_config(request, options = nil) + # Pass arguments to `create_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_scan_config(parent: nil, scan_config: nil) + # Pass arguments to `create_scan_config` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name where the scan is created, which should be a + # project resource name in the format 'projects/\\{projectId}'. + # @param scan_config [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash] + # Required. The ScanConfig to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new + # + # # Call the create_scan_config method. + # result = client.create_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. + # p result + # + def create_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest + + # Converts hash and nil to an 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_scan_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::WebSecurityScanner::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_scan_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.create_scan_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes an existing ScanConfig and its child resources. + # + # @overload delete_scan_config(request, options = nil) + # Pass arguments to `delete_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_scan_config(name: nil) + # Pass arguments to `delete_scan_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 resource name of the ScanConfig to be deleted. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @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/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new + # + # # Call the delete_scan_config method. + # result = client.delete_scan_config request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_scan_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::WebSecurityScanner::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_scan_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.delete_scan_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets a ScanConfig. + # + # @overload get_scan_config(request, options = nil) + # Pass arguments to `get_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_scan_config(name: nil) + # Pass arguments to `get_scan_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 resource name of the ScanConfig to be returned. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new + # + # # Call the get_scan_config method. + # result = client.get_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. + # p result + # + def get_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_scan_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::WebSecurityScanner::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_scan_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.get_scan_config request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Lists ScanConfigs under a given project. + # + # @overload list_scan_configs(request, options = nil) + # Pass arguments to `list_scan_configs` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_scan_configs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_scan_configs` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, which should be a project resource name in the + # format 'projects/\\{projectId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of ScanConfigs to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new + # + # # Call the list_scan_configs method. + # result = client.list_scan_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::WebSecurityScanner::V1beta::ScanConfig. + # p item + # end + # + def list_scan_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_scan_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::WebSecurityScanner::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_scan_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scan_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_scan_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, "scan_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates a ScanConfig. This method support partial update of a ScanConfig. + # + # @overload update_scan_config(request, options = nil) + # Pass arguments to `update_scan_config` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_scan_config(scan_config: nil, update_mask: nil) + # Pass arguments to `update_scan_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 scan_config [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash] + # Required. The ScanConfig to be updated. The name field must be set to identify the + # resource to be updated. The values of fields not covered by the mask + # will be ignored. + # @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::WebSecurityScanner::V1beta::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new + # + # # Call the update_scan_config method. + # result = client.update_scan_config request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. + # p result + # + def update_scan_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_scan_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::WebSecurityScanner::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_scan_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_scan_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.update_scan_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 + + ## + # Start a ScanRun according to the given ScanConfig. + # + # @overload start_scan_run(request, options = nil) + # Pass arguments to `start_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scan_run(name: nil) + # Pass arguments to `start_scan_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 resource name of the ScanConfig to be used. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new + # + # # Call the start_scan_run method. + # result = client.start_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. + # p result + # + def start_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest + + # Converts hash and nil to an 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_scan_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::WebSecurityScanner::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.start_scan_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.start_scan_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 + + ## + # Gets a ScanRun. + # + # @overload get_scan_run(request, options = nil) + # Pass arguments to `get_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_scan_run(name: nil) + # Pass arguments to `get_scan_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 resource name of the ScanRun to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new + # + # # Call the get_scan_run method. + # result = client.get_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. + # p result + # + def get_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_scan_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::WebSecurityScanner::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_scan_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.get_scan_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 + + ## + # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + # stop time. + # + # @overload list_scan_runs(request, options = nil) + # Pass arguments to `list_scan_runs` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_scan_runs(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_scan_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. The parent resource name, which should be a scan resource name in the + # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of ScanRuns to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new + # + # # Call the list_scan_runs method. + # result = client.list_scan_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::WebSecurityScanner::V1beta::ScanRun. + # p item + # end + # + def list_scan_runs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_scan_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::WebSecurityScanner::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_scan_runs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_scan_runs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_scan_runs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_runs, "scan_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 + + ## + # Stops a ScanRun. The stopped ScanRun is returned. + # + # @overload stop_scan_run(request, options = nil) + # Pass arguments to `stop_scan_run` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_scan_run(name: nil) + # Pass arguments to `stop_scan_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 resource name of the ScanRun to be stopped. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new + # + # # Call the stop_scan_run method. + # result = client.stop_scan_run request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. + # p result + # + def stop_scan_run request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest + + # Converts hash and nil to an 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_scan_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::WebSecurityScanner::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.stop_scan_run.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stop_scan_run.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.stop_scan_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 + + ## + # List CrawledUrls under a given ScanRun. + # + # @overload list_crawled_urls(request, options = nil) + # Pass arguments to `list_crawled_urls` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_crawled_urls(parent: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_crawled_urls` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of CrawledUrls to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new + # + # # Call the list_crawled_urls method. + # result = client.list_crawled_urls request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl. + # p item + # end + # + def list_crawled_urls request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_crawled_urls.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::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_crawled_urls.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_crawled_urls.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_crawled_urls request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, "crawled_urls", request, result, 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 Finding. + # + # @overload get_finding(request, options = nil) + # Pass arguments to `get_finding` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_finding(name: nil) + # Pass arguments to `get_finding` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Finding to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::Finding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new + # + # # Call the get_finding method. + # result = client.get_finding request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::Finding. + # p result + # + def get_finding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_finding.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::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_finding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_finding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.get_finding request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List Findings under a given ScanRun. + # + # @overload list_findings(request, options = nil) + # Pass arguments to `list_findings` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) + # Pass arguments to `list_findings` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @param filter [::String] + # Required. The filter expression. The expression must be in the format: + # . + # Supported field: 'finding_type'. + # Supported operator: '='. + # @param page_token [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @param page_size [::Integer] + # The maximum number of Findings to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new + # + # # Call the list_findings method. + # result = client.list_findings request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::Finding. + # p item + # end + # + def list_findings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_findings.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::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_findings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_findings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_findings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_findings, "findings", request, result, 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 FindingTypeStats under a given ScanRun. + # + # @overload list_finding_type_stats(request, options = nil) + # Pass arguments to `list_finding_type_stats` via a request object, either of type + # {::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_finding_type_stats(parent: nil) + # Pass arguments to `list_finding_type_stats` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/web_security_scanner/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new + # + # # Call the list_finding_type_stats method. + # result = client.list_finding_type_stats request + # + # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse. + # p result + # + def list_finding_type_stats request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_finding_type_stats.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::WebSecurityScanner::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_finding_type_stats.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_finding_type_stats.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @web_security_scanner_stub.list_finding_type_stats request, 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 WebSecurityScanner REST API. + # + # This class represents the configuration for WebSecurityScanner 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::WebSecurityScanner::V1beta::WebSecurityScanner::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_scan_config to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_scan_config.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_scan_config.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "websecurityscanner.googleapis.com" + + config_attr :endpoint, nil, ::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 WebSecurityScanner API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `create_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_scan_config + ## + # RPC-specific configuration for `delete_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_scan_config + ## + # RPC-specific configuration for `get_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scan_config + ## + # RPC-specific configuration for `list_scan_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scan_configs + ## + # RPC-specific configuration for `update_scan_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_scan_config + ## + # RPC-specific configuration for `start_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :start_scan_run + ## + # RPC-specific configuration for `get_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :get_scan_run + ## + # RPC-specific configuration for `list_scan_runs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_scan_runs + ## + # RPC-specific configuration for `stop_scan_run` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_scan_run + ## + # RPC-specific configuration for `list_crawled_urls` + # @return [::Gapic::Config::Method] + # + attr_reader :list_crawled_urls + ## + # RPC-specific configuration for `get_finding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_finding + ## + # RPC-specific configuration for `list_findings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_findings + ## + # RPC-specific configuration for `list_finding_type_stats` + # @return [::Gapic::Config::Method] + # + attr_reader :list_finding_type_stats + + # @private + def initialize parent_rpcs = nil + create_scan_config_config = parent_rpcs.create_scan_config if parent_rpcs.respond_to? :create_scan_config + @create_scan_config = ::Gapic::Config::Method.new create_scan_config_config + delete_scan_config_config = parent_rpcs.delete_scan_config if parent_rpcs.respond_to? :delete_scan_config + @delete_scan_config = ::Gapic::Config::Method.new delete_scan_config_config + get_scan_config_config = parent_rpcs.get_scan_config if parent_rpcs.respond_to? :get_scan_config + @get_scan_config = ::Gapic::Config::Method.new get_scan_config_config + list_scan_configs_config = parent_rpcs.list_scan_configs if parent_rpcs.respond_to? :list_scan_configs + @list_scan_configs = ::Gapic::Config::Method.new list_scan_configs_config + update_scan_config_config = parent_rpcs.update_scan_config if parent_rpcs.respond_to? :update_scan_config + @update_scan_config = ::Gapic::Config::Method.new update_scan_config_config + start_scan_run_config = parent_rpcs.start_scan_run if parent_rpcs.respond_to? :start_scan_run + @start_scan_run = ::Gapic::Config::Method.new start_scan_run_config + get_scan_run_config = parent_rpcs.get_scan_run if parent_rpcs.respond_to? :get_scan_run + @get_scan_run = ::Gapic::Config::Method.new get_scan_run_config + list_scan_runs_config = parent_rpcs.list_scan_runs if parent_rpcs.respond_to? :list_scan_runs + @list_scan_runs = ::Gapic::Config::Method.new list_scan_runs_config + stop_scan_run_config = parent_rpcs.stop_scan_run if parent_rpcs.respond_to? :stop_scan_run + @stop_scan_run = ::Gapic::Config::Method.new stop_scan_run_config + list_crawled_urls_config = parent_rpcs.list_crawled_urls if parent_rpcs.respond_to? :list_crawled_urls + @list_crawled_urls = ::Gapic::Config::Method.new list_crawled_urls_config + get_finding_config = parent_rpcs.get_finding if parent_rpcs.respond_to? :get_finding + @get_finding = ::Gapic::Config::Method.new get_finding_config + list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings + @list_findings = ::Gapic::Config::Method.new list_findings_config + list_finding_type_stats_config = parent_rpcs.list_finding_type_stats if parent_rpcs.respond_to? :list_finding_type_stats + @list_finding_type_stats = ::Gapic::Config::Method.new list_finding_type_stats_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb new file mode 100644 index 000000000000..bcd26bf90ea5 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb @@ -0,0 +1,878 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/websecurityscanner/v1beta/web_security_scanner_pb" + +module Google + module Cloud + module WebSecurityScanner + module V1beta + module WebSecurityScanner + module Rest + ## + # REST service stub for the WebSecurityScanner 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_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # A result object deserialized from the server's reply + def create_scan_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_scan_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_scan_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_scan_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_scan_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_scan_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_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # A result object deserialized from the server's reply + def get_scan_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scan_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_scan_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_scan_configs REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse] + # A result object deserialized from the server's reply + def list_scan_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scan_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_scan_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # A result object deserialized from the server's reply + def update_scan_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_scan_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_scan_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.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_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # A result object deserialized from the server's reply + def start_scan_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_scan_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: "start_scan_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # A result object deserialized from the server's reply + def get_scan_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_scan_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_scan_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_scan_runs REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse] + # A result object deserialized from the server's reply + def list_scan_runs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_scan_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_scan_runs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse.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_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # A result object deserialized from the server's reply + def stop_scan_run request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stop_scan_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: "stop_scan_run", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_crawled_urls REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse] + # A result object deserialized from the server's reply + def list_crawled_urls request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_crawled_urls_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_crawled_urls", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_finding REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::Finding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::Finding] + # A result object deserialized from the server's reply + def get_finding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_finding_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_finding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::Finding.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_findings REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse] + # A result object deserialized from the server's reply + def list_findings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_findings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_finding_type_stats REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] + # A result object deserialized from the server's reply + def list_finding_type_stats request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_finding_type_stats_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_finding_type_stats", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse.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_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest] + # 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_scan_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/scanConfigs", + body: "scan_config", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_scan_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_scan_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scan_configs REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_scan_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/scanConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_scan_config REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_scan_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{scan_config.name}", + body: "scan_config", + matches: [ + ["scan_config.name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest] + # 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_scan_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_scan_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_scan_runs REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_scan_runs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/scanRuns", + matches: [ + ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the stop_scan_run REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest] + # 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_scan_run_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:stop", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_crawled_urls REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_crawled_urls_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/crawledUrls", + matches: [ + ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_finding REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_finding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/findings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_findings REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_findings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/findings", + matches: [ + ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_finding_type_stats REST call + # + # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_finding_type_stats_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/findingTypeStats", + matches: [ + ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb new file mode 100644 index 000000000000..449ef3c1bef6 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/crawled_url.proto + +require 'google/protobuf' + + +descriptor_data = "\n8google/cloud/websecurityscanner/v1beta/crawled_url.proto\x12&google.cloud.websecurityscanner.v1beta\"<\n\nCrawledUrl\x12\x13\n\x0bhttp_method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0c\n\x04\x62ody\x18\x03 \x01(\tB\x99\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0f\x43rawledUrlProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + CrawledUrl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.CrawledUrl").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb new file mode 100644 index 000000000000..37bf5666a7f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/finding_addon.proto + +require 'google/protobuf' + + +descriptor_data = "\n:google/cloud/websecurityscanner/v1beta/finding_addon.proto\x12&google.cloud.websecurityscanner.v1beta\"*\n\x04\x46orm\x12\x12\n\naction_uri\x18\x01 \x01(\t\x12\x0e\n\x06\x66ields\x18\x02 \x03(\t\"Q\n\x0fOutdatedLibrary\x12\x14\n\x0clibrary_name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x17\n\x0flearn_more_urls\x18\x03 \x03(\t\"?\n\x11ViolatingResource\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x14\n\x0cresource_url\x18\x02 \x01(\t\"/\n\x14VulnerableParameters\x12\x17\n\x0fparameter_names\x18\x01 \x03(\t\"\xe8\x01\n\x11VulnerableHeaders\x12Q\n\x07headers\x18\x01 \x03(\x0b\x32@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header\x12Y\n\x0fmissing_headers\x18\x02 \x03(\x0b\x32@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header\x1a%\n\x06Header\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"2\n\x03Xss\x12\x14\n\x0cstack_traces\x18\x01 \x03(\t\x12\x15\n\rerror_message\x18\x02 \x01(\tB\x9b\x02\n*com.google.cloud.websecurityscanner.v1betaB\x11\x46indingAddonProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + Form = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.Form").msgclass + OutdatedLibrary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.OutdatedLibrary").msgclass + ViolatingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ViolatingResource").msgclass + VulnerableParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.VulnerableParameters").msgclass + VulnerableHeaders = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.VulnerableHeaders").msgclass + VulnerableHeaders::Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header").msgclass + Xss = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.Xss").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb new file mode 100644 index 000000000000..deb1933acd4d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/finding.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/websecurityscanner/v1beta/finding_addon_pb' + + +descriptor_data = "\n4google/cloud/websecurityscanner/v1beta/finding.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x19google/api/resource.proto\x1a:google/cloud/websecurityscanner/v1beta/finding_addon.proto\"\xa9\x06\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x66inding_type\x18\x02 \x01(\t\x12\x13\n\x0bhttp_method\x18\x03 \x01(\t\x12\x12\n\nfuzzed_url\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x18\n\x10reproduction_url\x18\x07 \x01(\t\x12\x11\n\tframe_url\x18\x08 \x01(\t\x12\x11\n\tfinal_url\x18\t \x01(\t\x12\x13\n\x0btracking_id\x18\n \x01(\t\x12:\n\x04\x66orm\x18\x10 \x01(\x0b\x32,.google.cloud.websecurityscanner.v1beta.Form\x12Q\n\x10outdated_library\x18\x0b \x01(\x0b\x32\x37.google.cloud.websecurityscanner.v1beta.OutdatedLibrary\x12U\n\x12violating_resource\x18\x0c \x01(\x0b\x32\x39.google.cloud.websecurityscanner.v1beta.ViolatingResource\x12U\n\x12vulnerable_headers\x18\x0f \x01(\x0b\x32\x39.google.cloud.websecurityscanner.v1beta.VulnerableHeaders\x12[\n\x15vulnerable_parameters\x18\r \x01(\x0b\x32<.google.cloud.websecurityscanner.v1beta.VulnerableParameters\x12\x38\n\x03xss\x18\x0e \x01(\x0b\x32+.google.cloud.websecurityscanner.v1beta.Xss:\x84\x01\xea\x41\x80\x01\n)websecurityscanner.googleapis.com/Finding\x12Sprojects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}B\x96\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0c\x46indingProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.websecurityscanner.v1beta.Form", "google/cloud/websecurityscanner/v1beta/finding_addon.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.Finding").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb new file mode 100644 index 000000000000..7e7c45ccae03 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/finding_type_stats.proto + +require 'google/protobuf' + + +descriptor_data = "\n?google/cloud/websecurityscanner/v1beta/finding_type_stats.proto\x12&google.cloud.websecurityscanner.v1beta\"?\n\x10\x46indingTypeStats\x12\x14\n\x0c\x66inding_type\x18\x01 \x01(\t\x12\x15\n\rfinding_count\x18\x02 \x01(\x05\x42\x9f\x02\n*com.google.cloud.websecurityscanner.v1betaB\x15\x46indingTypeStatsProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + FindingTypeStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.FindingTypeStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb new file mode 100644 index 000000000000..d02399ae0eac --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/scan_config_error.proto + +require 'google/protobuf' + + +descriptor_data = "\n>google/cloud/websecurityscanner/v1beta/scan_config_error.proto\x12&google.cloud.websecurityscanner.v1beta\"\xed\x0b\n\x0fScanConfigError\x12J\n\x04\x63ode\x18\x01 \x01(\x0e\x32<.google.cloud.websecurityscanner.v1beta.ScanConfigError.Code\x12\x12\n\nfield_name\x18\x02 \x01(\t\"\xf9\n\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x1f\n\x1b\x41PPENGINE_API_BACKEND_ERROR\x10\x02\x12 \n\x1c\x41PPENGINE_API_NOT_ACCESSIBLE\x10\x03\x12\"\n\x1e\x41PPENGINE_DEFAULT_HOST_MISSING\x10\x04\x12!\n\x1d\x43\x41NNOT_USE_GOOGLE_COM_ACCOUNT\x10\x06\x12\x1c\n\x18\x43\x41NNOT_USE_OWNER_ACCOUNT\x10\x07\x12\x1d\n\x19\x43OMPUTE_API_BACKEND_ERROR\x10\x08\x12\x1e\n\x1a\x43OMPUTE_API_NOT_ACCESSIBLE\x10\t\x12\x37\n3CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\n\x12\x1e\n\x1a\x43USTOM_LOGIN_URL_MALFORMED\x10\x0b\x12\x33\n/CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x0c\x12\x31\n-CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10\r\x12\x30\n,CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10\x0e\x12.\n*CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS\x10\x0f\x12\x17\n\x13\x44UPLICATE_SCAN_NAME\x10\x10\x12\x17\n\x13INVALID_FIELD_VALUE\x10\x12\x12$\n FAILED_TO_AUTHENTICATE_TO_TARGET\x10\x13\x12\x1c\n\x18\x46INDING_TYPE_UNSPECIFIED\x10\x14\x12\x1d\n\x19\x46ORBIDDEN_TO_SCAN_COMPUTE\x10\x15\x12$\n FORBIDDEN_UPDATE_TO_MANAGED_SCAN\x10+\x12\x14\n\x10MALFORMED_FILTER\x10\x16\x12\x1b\n\x17MALFORMED_RESOURCE_NAME\x10\x17\x12\x14\n\x10PROJECT_INACTIVE\x10\x18\x12\x12\n\x0eREQUIRED_FIELD\x10\x19\x12\x1e\n\x1aRESOURCE_NAME_INCONSISTENT\x10\x1a\x12\x18\n\x14SCAN_ALREADY_RUNNING\x10\x1b\x12\x14\n\x10SCAN_NOT_RUNNING\x10\x1c\x12/\n+SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\x1d\x12\x16\n\x12SEED_URL_MALFORMED\x10\x1e\x12+\n\'SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x1f\x12)\n%SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10 \x12(\n$SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10!\x12&\n\"SEED_URL_HAS_UNRESERVED_IP_ADDRESS\x10#\x12\"\n\x1eSERVICE_ACCOUNT_NOT_CONFIGURED\x10$\x12\x12\n\x0eTOO_MANY_SCANS\x10%\x12\"\n\x1eUNABLE_TO_RESOLVE_PROJECT_INFO\x10&\x12(\n$UNSUPPORTED_BLACKLIST_PATTERN_FORMAT\x10\'\x12\x16\n\x12UNSUPPORTED_FILTER\x10(\x12\x1c\n\x18UNSUPPORTED_FINDING_TYPE\x10)\x12\x1a\n\x16UNSUPPORTED_URL_SCHEME\x10*\x1a\x02\x10\x01\x42\x9e\x02\n*com.google.cloud.websecurityscanner.v1betaB\x14ScanConfigErrorProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + ScanConfigError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfigError").msgclass + ScanConfigError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfigError.Code").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb new file mode 100644 index 000000000000..fd58a4054743 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb @@ -0,0 +1,57 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/scan_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/websecurityscanner/v1beta/scan_run_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n8google/cloud/websecurityscanner/v1beta/scan_config.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/websecurityscanner/v1beta/scan_run.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\r\n\nScanConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07max_qps\x18\x03 \x01(\x05\x12\x1a\n\rstarting_urls\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12Y\n\x0e\x61uthentication\x18\x05 \x01(\x0b\x32\x41.google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication\x12P\n\nuser_agent\x18\x06 \x01(\x0e\x32<.google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent\x12\x1a\n\x12\x62lacklist_patterns\x18\x07 \x03(\t\x12M\n\x08schedule\x18\x08 \x01(\x0b\x32;.google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule\x12[\n\x10target_platforms\x18\t \x03(\x0e\x32\x41.google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform\x12{\n!export_to_security_command_center\x18\n \x01(\x0e\x32P.google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter\x12\x43\n\nlatest_run\x18\x0b \x01(\x0b\x32/.google.cloud.websecurityscanner.v1beta.ScanRun\x12P\n\nrisk_level\x18\x0c \x01(\x0e\x32<.google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel\x1a\x94\x03\n\x0e\x41uthentication\x12i\n\x0egoogle_account\x18\x01 \x01(\x0b\x32O.google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccountH\x00\x12i\n\x0e\x63ustom_account\x18\x02 \x01(\x0b\x32O.google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccountH\x00\x1a@\n\rGoogleAccount\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08password\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x1aX\n\rCustomAccount\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08password\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x12\x16\n\tlogin_url\x18\x03 \x01(\tB\x03\xe0\x41\x02\x42\x10\n\x0e\x61uthentication\x1a\x62\n\x08Schedule\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12#\n\x16interval_duration_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"`\n\tUserAgent\x12\x1a\n\x16USER_AGENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43HROME_LINUX\x10\x01\x12\x12\n\x0e\x43HROME_ANDROID\x10\x02\x12\x11\n\rSAFARI_IPHONE\x10\x03\"N\n\x0eTargetPlatform\x12\x1f\n\x1bTARGET_PLATFORM_UNSPECIFIED\x10\x00\x12\x0e\n\nAPP_ENGINE\x10\x01\x12\x0b\n\x07\x43OMPUTE\x10\x02\"<\n\tRiskLevel\x12\x1a\n\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\"m\n\x1d\x45xportToSecurityCommandCenter\x12\x31\n-EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:_\xea\x41\\\n,websecurityscanner.googleapis.com/ScanConfig\x12,projects/{project}/scanConfigs/{scan_config}B\x99\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0fScanConfigProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.websecurityscanner.v1beta.ScanRun", "google/cloud/websecurityscanner/v1beta/scan_run.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + ScanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig").msgclass + ScanConfig::Authentication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication").msgclass + ScanConfig::Authentication::GoogleAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount").msgclass + ScanConfig::Authentication::CustomAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount").msgclass + ScanConfig::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule").msgclass + ScanConfig::UserAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent").enummodule + ScanConfig::TargetPlatform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform").enummodule + ScanConfig::RiskLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel").enummodule + ScanConfig::ExportToSecurityCommandCenter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb new file mode 100644 index 000000000000..9fce2a3dc313 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto + +require 'google/protobuf' + +require 'google/cloud/websecurityscanner/v1beta/scan_config_error_pb' + + +descriptor_data = "\nAgoogle/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto\x12&google.cloud.websecurityscanner.v1beta\x1a>google/cloud/websecurityscanner/v1beta/scan_config_error.proto\"\x95\x03\n\x11ScanRunErrorTrace\x12L\n\x04\x63ode\x18\x01 \x01(\x0e\x32>.google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code\x12R\n\x11scan_config_error\x18\x02 \x01(\x0b\x32\x37.google.cloud.websecurityscanner.v1beta.ScanConfigError\x12#\n\x1bmost_common_http_error_code\x18\x03 \x01(\x05\"\xb8\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x15\n\x11SCAN_CONFIG_ISSUE\x10\x02\x12\x1f\n\x1b\x41UTHENTICATION_CONFIG_ISSUE\x10\x03\x12\x1c\n\x18TIMED_OUT_WHILE_SCANNING\x10\x04\x12\x16\n\x12TOO_MANY_REDIRECTS\x10\x05\x12\x18\n\x14TOO_MANY_HTTP_ERRORS\x10\x06\x42\xa0\x02\n*com.google.cloud.websecurityscanner.v1betaB\x16ScanRunErrorTraceProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.websecurityscanner.v1beta.ScanConfigError", "google/cloud/websecurityscanner/v1beta/scan_config_error.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + ScanRunErrorTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace").msgclass + ScanRunErrorTrace::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb new file mode 100644 index 000000000000..b4b0c361f10d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/scan_run.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb' +require 'google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/websecurityscanner/v1beta/scan_run.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x19google/api/resource.proto\x1a\x41google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto\x1a\x43google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd2\x06\n\x07ScanRun\x12\x0c\n\x04name\x18\x01 \x01(\t\x12W\n\x0f\x65xecution_state\x18\x02 \x01(\x0e\x32>.google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState\x12Q\n\x0cresult_state\x18\x03 \x01(\x0e\x32;.google.cloud.websecurityscanner.v1beta.ScanRun.ResultState\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12urls_crawled_count\x18\x06 \x01(\x03\x12\x19\n\x11urls_tested_count\x18\x07 \x01(\x03\x12\x1b\n\x13has_vulnerabilities\x18\x08 \x01(\x08\x12\x18\n\x10progress_percent\x18\t \x01(\x05\x12N\n\x0b\x65rror_trace\x18\n \x01(\x0b\x32\x39.google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace\x12S\n\x0ewarning_traces\x18\x0b \x03(\x0b\x32;.google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace\"Y\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0c\n\x08SCANNING\x10\x02\x12\x0c\n\x08\x46INISHED\x10\x03\"O\n\x0bResultState\x12\x1c\n\x18RESULT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\n\n\x06KILLED\x10\x03:p\xea\x41m\n)websecurityscanner.googleapis.com/ScanRun\x12@projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}B\x96\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0cScanRunProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace", "google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto"], + ["google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace", "google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + ScanRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRun").msgclass + ScanRun::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState").enummodule + ScanRun::ResultState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRun.ResultState").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb new file mode 100644 index 000000000000..eeec56602bcb --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto + +require 'google/protobuf' + + +descriptor_data = "\nCgoogle/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto\x12&google.cloud.websecurityscanner.v1beta\"\xed\x01\n\x13ScanRunWarningTrace\x12N\n\x04\x63ode\x18\x01 \x01(\x0e\x32@.google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code\"\x85\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aINSUFFICIENT_CRAWL_RESULTS\x10\x01\x12\x1a\n\x16TOO_MANY_CRAWL_RESULTS\x10\x02\x12\x17\n\x13TOO_MANY_FUZZ_TASKS\x10\x03\x12\x12\n\x0e\x42LOCKED_BY_IAP\x10\x04\x42\xa2\x02\n*com.google.cloud.websecurityscanner.v1betaB\x18ScanRunWarningTraceProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + ScanRunWarningTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace").msgclass + ScanRunWarningTrace::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb new file mode 100644 index 000000000000..63802e3fe6d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/websecurityscanner/v1beta/web_security_scanner.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/websecurityscanner/v1beta/crawled_url_pb' +require 'google/cloud/websecurityscanner/v1beta/finding_pb' +require 'google/cloud/websecurityscanner/v1beta/finding_type_stats_pb' +require 'google/cloud/websecurityscanner/v1beta/scan_config_pb' +require 'google/cloud/websecurityscanner/v1beta/scan_run_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' + + +descriptor_data = "\nAgoogle/cloud/websecurityscanner/v1beta/web_security_scanner.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/websecurityscanner/v1beta/crawled_url.proto\x1a\x34google/cloud/websecurityscanner/v1beta/finding.proto\x1a?google/cloud/websecurityscanner/v1beta/finding_type_stats.proto\x1a\x38google/cloud/websecurityscanner/v1beta/scan_config.proto\x1a\x35google/cloud/websecurityscanner/v1beta/scan_run.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xac\x01\n\x17\x43reateScanConfigRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12L\n\x0bscan_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.websecurityscanner.v1beta.ScanConfigB\x03\xe0\x41\x02\"]\n\x17\x44\x65leteScanConfigRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,websecurityscanner.googleapis.com/ScanConfig\"Z\n\x14GetScanConfigRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,websecurityscanner.googleapis.com/ScanConfig\"\x84\x01\n\x16ListScanConfigsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x9d\x01\n\x17UpdateScanConfigRequest\x12L\n\x0bscan_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.websecurityscanner.v1beta.ScanConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"|\n\x17ListScanConfigsResponse\x12H\n\x0cscan_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.websecurityscanner.v1beta.ScanConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x13StartScanRunRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,websecurityscanner.googleapis.com/ScanConfig\"T\n\x11GetScanRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\"\x82\x01\n\x13ListScanRunsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,websecurityscanner.googleapis.com/ScanConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"s\n\x14ListScanRunsResponse\x12\x42\n\tscan_runs\x18\x01 \x03(\x0b\x32/.google.cloud.websecurityscanner.v1beta.ScanRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"U\n\x12StopScanRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\"\x82\x01\n\x16ListCrawledUrlsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"|\n\x17ListCrawledUrlsResponse\x12H\n\x0c\x63rawled_urls\x18\x01 \x03(\x0b\x32\x32.google.cloud.websecurityscanner.v1beta.CrawledUrl\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"T\n\x11GetFindingRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/Finding\"\x94\x01\n\x13ListFindingsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"r\n\x14ListFindingsResponse\x12\x41\n\x08\x66indings\x18\x01 \x03(\x0b\x32/.google.cloud.websecurityscanner.v1beta.Finding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"`\n\x1bListFindingTypeStatsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\"t\n\x1cListFindingTypeStatsResponse\x12T\n\x12\x66inding_type_stats\x18\x01 \x03(\x0b\x32\x38.google.cloud.websecurityscanner.v1beta.FindingTypeStats2\x8e\x16\n\x12WebSecurityScanner\x12\xda\x01\n\x10\x43reateScanConfig\x12?.google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest\x1a\x32.google.cloud.websecurityscanner.v1beta.ScanConfig\"Q\xda\x41\x12parent,scan_config\x82\xd3\xe4\x93\x02\x36\"\'/v1beta/{parent=projects/*}/scanConfigs:\x0bscan_config\x12\xa3\x01\n\x10\x44\x65leteScanConfig\x12?.google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest\x1a\x16.google.protobuf.Empty\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)*\'/v1beta/{name=projects/*/scanConfigs/*}\x12\xb9\x01\n\rGetScanConfig\x12<.google.cloud.websecurityscanner.v1beta.GetScanConfigRequest\x1a\x32.google.cloud.websecurityscanner.v1beta.ScanConfig\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/v1beta/{name=projects/*/scanConfigs/*}\x12\xcc\x01\n\x0fListScanConfigs\x12>.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest\x1a?.google.cloud.websecurityscanner.v1beta.ListScanConfigsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/v1beta/{parent=projects/*}/scanConfigs\x12\xeb\x01\n\x10UpdateScanConfig\x12?.google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest\x1a\x32.google.cloud.websecurityscanner.v1beta.ScanConfig\"b\xda\x41\x17scan_config,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x33/v1beta/{scan_config.name=projects/*/scanConfigs/*}:\x0bscan_config\x12\xbd\x01\n\x0cStartScanRun\x12;.google.cloud.websecurityscanner.v1beta.StartScanRunRequest\x1a/.google.cloud.websecurityscanner.v1beta.ScanRun\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\"-/v1beta/{name=projects/*/scanConfigs/*}:start:\x01*\x12\xbb\x01\n\nGetScanRun\x12\x39.google.cloud.websecurityscanner.v1beta.GetScanRunRequest\x1a/.google.cloud.websecurityscanner.v1beta.ScanRun\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}\x12\xce\x01\n\x0cListScanRuns\x12;.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest\x1a<.google.cloud.websecurityscanner.v1beta.ListScanRunsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{parent=projects/*/scanConfigs/*}/scanRuns\x12\xc5\x01\n\x0bStopScanRun\x12:.google.cloud.websecurityscanner.v1beta.StopScanRunRequest\x1a/.google.cloud.websecurityscanner.v1beta.ScanRun\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}:stop:\x01*\x12\xe5\x01\n\x0fListCrawledUrls\x12>.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest\x1a?.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls\x12\xc6\x01\n\nGetFinding\x12\x39.google.cloud.websecurityscanner.v1beta.GetFindingRequest\x1a/.google.cloud.websecurityscanner.v1beta.Finding\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}\x12\xe0\x01\n\x0cListFindings\x12;.google.cloud.websecurityscanner.v1beta.ListFindingsRequest\x1a<.google.cloud.websecurityscanner.v1beta.ListFindingsResponse\"U\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02?\x12=/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings\x12\xf9\x01\n\x14ListFindingTypeStats\x12\x43.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest\x1a\x44.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats\x1aU\xca\x41!websecurityscanner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa1\x02\n*com.google.cloud.websecurityscanner.v1betaB\x17WebSecurityScannerProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.websecurityscanner.v1beta.ScanConfig", "google/cloud/websecurityscanner/v1beta/scan_config.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.cloud.websecurityscanner.v1beta.ScanRun", "google/cloud/websecurityscanner/v1beta/scan_run.proto"], + ["google.cloud.websecurityscanner.v1beta.CrawledUrl", "google/cloud/websecurityscanner/v1beta/crawled_url.proto"], + ["google.cloud.websecurityscanner.v1beta.Finding", "google/cloud/websecurityscanner/v1beta/finding.proto"], + ["google.cloud.websecurityscanner.v1beta.FindingTypeStats", "google/cloud/websecurityscanner/v1beta/finding_type_stats.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module WebSecurityScanner + module V1beta + CreateScanConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest").msgclass + DeleteScanConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest").msgclass + GetScanConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.GetScanConfigRequest").msgclass + ListScanConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest").msgclass + UpdateScanConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest").msgclass + ListScanConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListScanConfigsResponse").msgclass + StartScanRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.StartScanRunRequest").msgclass + GetScanRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.GetScanRunRequest").msgclass + ListScanRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListScanRunsRequest").msgclass + ListScanRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListScanRunsResponse").msgclass + StopScanRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.StopScanRunRequest").msgclass + ListCrawledUrlsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest").msgclass + ListCrawledUrlsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListCrawledUrlsResponse").msgclass + GetFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.GetFindingRequest").msgclass + ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListFindingsRequest").msgclass + ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListFindingsResponse").msgclass + ListFindingTypeStatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest").msgclass + ListFindingTypeStatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb new file mode 100644 index 000000000000..d1cdbdcd623f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb @@ -0,0 +1,73 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/websecurityscanner/v1beta/web_security_scanner.proto for package 'Google.Cloud.WebSecurityScanner.V1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +require 'grpc' +require 'google/cloud/websecurityscanner/v1beta/web_security_scanner_pb' + +module Google + module Cloud + module WebSecurityScanner + module V1beta + module WebSecurityScanner + # Cloud Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud Platform. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner' + + # Creates a new ScanConfig. + rpc :CreateScanConfig, ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig + # Deletes an existing ScanConfig and its child resources. + rpc :DeleteScanConfig, ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest, ::Google::Protobuf::Empty + # Gets a ScanConfig. + rpc :GetScanConfig, ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig + # Lists ScanConfigs under a given project. + rpc :ListScanConfigs, ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse + # Updates a ScanConfig. This method support partial update of a ScanConfig. + rpc :UpdateScanConfig, ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig + # Start a ScanRun according to the given ScanConfig. + rpc :StartScanRun, ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun + # Gets a ScanRun. + rpc :GetScanRun, ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun + # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun + # stop time. + rpc :ListScanRuns, ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse + # Stops a ScanRun. The stopped ScanRun is returned. + rpc :StopScanRun, ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun + # List CrawledUrls under a given ScanRun. + rpc :ListCrawledUrls, ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse + # Gets a Finding. + rpc :GetFinding, ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest, ::Google::Cloud::WebSecurityScanner::V1beta::Finding + # List Findings under a given ScanRun. + rpc :ListFindings, ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse + # List all FindingTypeStats under a given ScanRun. + rpc :ListFindingTypeStats, ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..c39a919c1cab --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Web Security Scanner 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-web_security_scanner-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb new file mode 100644 index 000000000000..16a4684b0a87 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.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 WebSecurityScanner + module V1beta + # A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web + # Security Scanner Service crawls the web applications, following all links + # within the scope of sites, to find the URLs to test against. + # @!attribute [rw] http_method + # @return [::String] + # The http method of the request that was used to visit the URL, in + # uppercase. + # @!attribute [rw] url + # @return [::String] + # The URL that was crawled. + # @!attribute [rw] body + # @return [::String] + # The body of the request that was used to visit the URL. + class CrawledUrl + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb new file mode 100644 index 000000000000..b6d583c7a7df --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.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 WebSecurityScanner + module V1beta + # A Finding resource represents a vulnerability instance identified during a + # ScanRun. + # @!attribute [rw] name + # @return [::String] + # The resource name of the Finding. The name follows the format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanruns/\\{scanRunId}/findings/\\{findingId}'. + # The finding IDs are generated by the system. + # @!attribute [rw] finding_type + # @return [::String] + # The type of the Finding. + # Detailed and up-to-date information on findings can be found here: + # https://cloud.google.com/security-scanner/docs/scan-result-details + # @!attribute [rw] http_method + # @return [::String] + # The http method of the request that triggered the vulnerability, in + # uppercase. + # @!attribute [rw] fuzzed_url + # @return [::String] + # The URL produced by the server-side fuzzer and used in the request that + # triggered the vulnerability. + # @!attribute [rw] body + # @return [::String] + # The body of the request that triggered the vulnerability. + # @!attribute [rw] description + # @return [::String] + # The description of the vulnerability. + # @!attribute [rw] reproduction_url + # @return [::String] + # The URL containing human-readable payload that user can leverage to + # reproduce the vulnerability. + # @!attribute [rw] frame_url + # @return [::String] + # If the vulnerability was originated from nested IFrame, the immediate + # parent IFrame is reported. + # @!attribute [rw] final_url + # @return [::String] + # The URL where the browser lands when the vulnerability is detected. + # @!attribute [rw] tracking_id + # @return [::String] + # The tracking ID uniquely identifies a vulnerability instance across + # multiple ScanRuns. + # @!attribute [rw] form + # @return [::Google::Cloud::WebSecurityScanner::V1beta::Form] + # An addon containing information reported for a vulnerability with an HTML + # form, if any. + # @!attribute [rw] outdated_library + # @return [::Google::Cloud::WebSecurityScanner::V1beta::OutdatedLibrary] + # An addon containing information about outdated libraries. + # @!attribute [rw] violating_resource + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ViolatingResource] + # An addon containing detailed information regarding any resource causing the + # vulnerability such as JavaScript sources, image, audio files, etc. + # @!attribute [rw] vulnerable_headers + # @return [::Google::Cloud::WebSecurityScanner::V1beta::VulnerableHeaders] + # An addon containing information about vulnerable or missing HTTP headers. + # @!attribute [rw] vulnerable_parameters + # @return [::Google::Cloud::WebSecurityScanner::V1beta::VulnerableParameters] + # An addon containing information about request parameters which were found + # to be vulnerable. + # @!attribute [rw] xss + # @return [::Google::Cloud::WebSecurityScanner::V1beta::Xss] + # An addon containing information reported for an XSS, if any. + class Finding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb new file mode 100644 index 000000000000..950dc9db788a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb @@ -0,0 +1,111 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1beta + # ! Information about a vulnerability with an HTML. + # @!attribute [rw] action_uri + # @return [::String] + # ! The URI where to send the form when it's submitted. + # @!attribute [rw] fields + # @return [::Array<::String>] + # ! The names of form fields related to the vulnerability. + class Form + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information reported for an outdated library. + # @!attribute [rw] library_name + # @return [::String] + # The name of the outdated library. + # @!attribute [rw] version + # @return [::String] + # The version number. + # @!attribute [rw] learn_more_urls + # @return [::Array<::String>] + # URLs to learn more information about the vulnerabilities in the library. + class OutdatedLibrary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information regarding any resource causing the vulnerability such + # as JavaScript sources, image, audio files, etc. + # @!attribute [rw] content_type + # @return [::String] + # The MIME type of this resource. + # @!attribute [rw] resource_url + # @return [::String] + # URL of this violating resource. + class ViolatingResource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about vulnerable request parameters. + # @!attribute [rw] parameter_names + # @return [::Array<::String>] + # The vulnerable parameter names. + class VulnerableParameters + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about vulnerable or missing HTTP Headers. + # @!attribute [rw] headers + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::VulnerableHeaders::Header>] + # List of vulnerable headers. + # @!attribute [rw] missing_headers + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::VulnerableHeaders::Header>] + # List of missing headers. + class VulnerableHeaders + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a HTTP Header. + # @!attribute [rw] name + # @return [::String] + # Header name. + # @!attribute [rw] value + # @return [::String] + # Header value. + class Header + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Information reported for an XSS. + # @!attribute [rw] stack_traces + # @return [::Array<::String>] + # Stack traces leading to the point where the XSS occurred. + # @!attribute [rw] error_message + # @return [::String] + # An error message generated by a javascript breakage. + class Xss + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb new file mode 100644 index 000000000000..a04437f47106 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1beta + # A FindingTypeStats resource represents stats regarding a specific FindingType + # of Findings under a given ScanRun. + # @!attribute [rw] finding_type + # @return [::String] + # The finding type associated with the stats. + # @!attribute [rw] finding_count + # @return [::Integer] + # The count of findings belonging to this finding type. + class FindingTypeStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb new file mode 100644 index 000000000000..b814049f15c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb @@ -0,0 +1,192 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1beta + # A ScanConfig resource contains the configurations to launch a scan. + # @!attribute [rw] name + # @return [::String] + # The resource name of the ScanConfig. The name follows the format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. The ScanConfig IDs are + # generated by the system. + # @!attribute [rw] display_name + # @return [::String] + # Required. The user provided display name of the ScanConfig. + # @!attribute [rw] max_qps + # @return [::Integer] + # The maximum QPS during scanning. A valid value ranges from 5 to 20 + # inclusively. If the field is unspecified or its value is set 0, server will + # default to 15. Other values outside of [5, 20] range will be rejected with + # INVALID_ARGUMENT error. + # @!attribute [rw] starting_urls + # @return [::Array<::String>] + # Required. The starting URLs from which the scanner finds site pages. + # @!attribute [rw] authentication + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Authentication] + # The authentication configuration. If specified, service will use the + # authentication configuration during scanning. + # @!attribute [rw] user_agent + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::UserAgent] + # The user agent used during scanning. + # @!attribute [rw] blacklist_patterns + # @return [::Array<::String>] + # The blacklist URL patterns as described in + # https://cloud.google.com/security-scanner/docs/excluded-urls + # @!attribute [rw] schedule + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Schedule] + # The schedule of the ScanConfig. + # @!attribute [rw] target_platforms + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::TargetPlatform>] + # Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be + # used as a default. + # @!attribute [rw] export_to_security_command_center + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::ExportToSecurityCommandCenter] + # Controls export of scan configurations and results to Cloud Security + # Command Center. + # @!attribute [rw] latest_run + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] + # Latest ScanRun if available. + # @!attribute [rw] risk_level + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::RiskLevel] + # The risk level selected for the scan + class ScanConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Scan authentication configuration. + # @!attribute [rw] google_account + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Authentication::GoogleAccount] + # Authentication using a Google account. + # + # Note: The following fields are mutually exclusive: `google_account`, `custom_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] custom_account + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Authentication::CustomAccount] + # Authentication using a custom account. + # + # Note: The following fields are mutually exclusive: `custom_account`, `google_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Authentication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes authentication configuration that uses a Google account. + # @!attribute [rw] username + # @return [::String] + # Required. The user name of the Google account. + # @!attribute [rw] password + # @return [::String] + # Required. Input only. The password of the Google account. The credential is stored encrypted + # and not returned in any response nor included in audit logs. + class GoogleAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes authentication configuration that uses a custom account. + # @!attribute [rw] username + # @return [::String] + # Required. The user name of the custom account. + # @!attribute [rw] password + # @return [::String] + # Required. Input only. The password of the custom account. The credential is stored encrypted + # and not returned in any response nor included in audit logs. + # @!attribute [rw] login_url + # @return [::String] + # Required. The login form URL of the website. + class CustomAccount + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Scan schedule configuration. + # @!attribute [rw] schedule_time + # @return [::Google::Protobuf::Timestamp] + # A timestamp indicates when the next run will be scheduled. The value is + # refreshed by the server after each run. If unspecified, it will default + # to current server time, which means the scan will be scheduled to start + # immediately. + # @!attribute [rw] interval_duration_days + # @return [::Integer] + # Required. The duration of time between executions in days. + class Schedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Type of user agents used for scanning. + module UserAgent + # The user agent is unknown. Service will default to CHROME_LINUX. + USER_AGENT_UNSPECIFIED = 0 + + # Chrome on Linux. This is the service default if unspecified. + CHROME_LINUX = 1 + + # Chrome on Android. + CHROME_ANDROID = 2 + + # Safari on IPhone. + SAFARI_IPHONE = 3 + end + + # Cloud platforms supported by Cloud Web Security Scanner. + module TargetPlatform + # The target platform is unknown. Requests with this enum value will be + # rejected with INVALID_ARGUMENT error. + TARGET_PLATFORM_UNSPECIFIED = 0 + + # Google App Engine service. + APP_ENGINE = 1 + + # Google Compute Engine service. + COMPUTE = 2 + end + + # Scan risk levels supported by Cloud Web Security Scanner. LOW impact + # scanning will minimize requests with the potential to modify data. To + # achieve the maximum scan coverage, NORMAL risk level is recommended. + module RiskLevel + # Use default, which is NORMAL. + RISK_LEVEL_UNSPECIFIED = 0 + + # Normal scanning (Recommended) + NORMAL = 1 + + # Lower impact scanning + LOW = 2 + end + + # Controls export of scan configurations and results to Cloud Security + # Command Center. + module ExportToSecurityCommandCenter + # Use default, which is ENABLED. + EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0 + + # Export results of this scan to Cloud Security Command Center. + ENABLED = 1 + + # Do not export results of this scan to Cloud Security Command Center. + DISABLED = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb new file mode 100644 index 000000000000..35cbd2e7b0f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.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 WebSecurityScanner + module V1beta + # Defines a custom error message used by CreateScanConfig and UpdateScanConfig + # APIs when scan configuration validation fails. It is also reported as part of + # a ScanRunErrorTrace message if scan validation fails due to a scan + # configuration error. + # @!attribute [rw] code + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfigError::Code] + # Indicates the reason code for a configuration failure. + # @!attribute [rw] field_name + # @return [::String] + # Indicates the full name of the ScanConfig field that triggers this error, + # for example "scan_config.max_qps". This field is provided for + # troubleshooting purposes only and its actual value can change in the + # future. + class ScanConfigError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. + # Defines an error reason code. + # Next id: 44 + module Code + # There is no error. + CODE_UNSPECIFIED = 0 + + # There is no error. + OK = 0 + + # Indicates an internal server error. + # Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown. + INTERNAL_ERROR = 1 + + # One of the seed URLs is an App Engine URL but we cannot validate the scan + # settings due to an App Engine API backend error. + APPENGINE_API_BACKEND_ERROR = 2 + + # One of the seed URLs is an App Engine URL but we cannot access the + # App Engine API to validate scan settings. + APPENGINE_API_NOT_ACCESSIBLE = 3 + + # One of the seed URLs is an App Engine URL but the Default Host of the + # App Engine is not set. + APPENGINE_DEFAULT_HOST_MISSING = 4 + + # Google corporate accounts can not be used for scanning. + CANNOT_USE_GOOGLE_COM_ACCOUNT = 6 + + # The account of the scan creator can not be used for scanning. + CANNOT_USE_OWNER_ACCOUNT = 7 + + # This scan targets Compute Engine, but we cannot validate scan settings + # due to a Compute Engine API backend error. + COMPUTE_API_BACKEND_ERROR = 8 + + # This scan targets Compute Engine, but we cannot access the Compute Engine + # API to validate the scan settings. + COMPUTE_API_NOT_ACCESSIBLE = 9 + + # The Custom Login URL does not belong to the current project. + CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10 + + # The Custom Login URL is malformed (can not be parsed). + CUSTOM_LOGIN_URL_MALFORMED = 11 + + # The Custom Login URL is mapped to a non-routable IP address in DNS. + CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12 + + # The Custom Login URL is mapped to an IP address which is not reserved for + # the current project. + CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13 + + # The Custom Login URL has a non-routable IP address. + CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14 + + # The Custom Login URL has an IP address which is not reserved for the + # current project. + CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15 + + # Another scan with the same name (case-sensitive) already exists. + DUPLICATE_SCAN_NAME = 16 + + # A field is set to an invalid value. + INVALID_FIELD_VALUE = 18 + + # There was an error trying to authenticate to the scan target. + FAILED_TO_AUTHENTICATE_TO_TARGET = 19 + + # Finding type value is not specified in the list findings request. + FINDING_TYPE_UNSPECIFIED = 20 + + # Scan targets Compute Engine, yet current project was not whitelisted for + # Google Compute Engine Scanning Alpha access. + FORBIDDEN_TO_SCAN_COMPUTE = 21 + + # User tries to update managed scan + FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43 + + # The supplied filter is malformed. For example, it can not be parsed, does + # not have a filter type in expression, or the same filter type appears + # more than once. + MALFORMED_FILTER = 22 + + # The supplied resource name is malformed (can not be parsed). + MALFORMED_RESOURCE_NAME = 23 + + # The current project is not in an active state. + PROJECT_INACTIVE = 24 + + # A required field is not set. + REQUIRED_FIELD = 25 + + # Project id, scanconfig id, scanrun id, or finding id are not consistent + # with each other in resource name. + RESOURCE_NAME_INCONSISTENT = 26 + + # The scan being requested to start is already running. + SCAN_ALREADY_RUNNING = 27 + + # The scan that was requested to be stopped is not running. + SCAN_NOT_RUNNING = 28 + + # One of the seed URLs does not belong to the current project. + SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29 + + # One of the seed URLs is malformed (can not be parsed). + SEED_URL_MALFORMED = 30 + + # One of the seed URLs is mapped to a non-routable IP address in DNS. + SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31 + + # One of the seed URLs is mapped to an IP address which is not reserved + # for the current project. + SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32 + + # One of the seed URLs has on-routable IP address. + SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33 + + # One of the seed URLs has an IP address that is not reserved + # for the current project. + SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35 + + # The Cloud Security Scanner service account is not configured under the + # project. + SERVICE_ACCOUNT_NOT_CONFIGURED = 36 + + # A project has reached the maximum number of scans. + TOO_MANY_SCANS = 37 + + # Resolving the details of the current project fails. + UNABLE_TO_RESOLVE_PROJECT_INFO = 38 + + # One or more blacklist patterns were in the wrong format. + UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39 + + # The supplied filter is not supported. + UNSUPPORTED_FILTER = 40 + + # The supplied finding type is not supported. For example, we do not + # provide findings of the given finding type. + UNSUPPORTED_FINDING_TYPE = 41 + + # The URL scheme of one or more of the supplied URLs is not supported. + UNSUPPORTED_URL_SCHEME = 42 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb new file mode 100644 index 000000000000..2ee0a0f3dc7b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.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 WebSecurityScanner + module V1beta + # A ScanRun is a output-only resource representing an actual run of the scan. + # Next id: 12 + # @!attribute [rw] name + # @return [::String] + # The resource name of the ScanRun. The name follows the format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # The ScanRun IDs are generated by the system. + # @!attribute [rw] execution_state + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun::ExecutionState] + # The execution state of the ScanRun. + # @!attribute [rw] result_state + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun::ResultState] + # The result state of the ScanRun. This field is only available after the + # execution state reaches "FINISHED". + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the ScanRun started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the ScanRun reached termination state - that the ScanRun + # is either finished or stopped by user. + # @!attribute [rw] urls_crawled_count + # @return [::Integer] + # The number of URLs crawled during this ScanRun. If the scan is in progress, + # the value represents the number of URLs crawled up to now. + # @!attribute [rw] urls_tested_count + # @return [::Integer] + # The number of URLs tested during this ScanRun. If the scan is in progress, + # the value represents the number of URLs tested up to now. The number of + # URLs tested is usually larger than the number URLS crawled because + # typically a crawled URL is tested with multiple test payloads. + # @!attribute [rw] has_vulnerabilities + # @return [::Boolean] + # Whether the scan run has found any vulnerabilities. + # @!attribute [rw] progress_percent + # @return [::Integer] + # The percentage of total completion ranging from 0 to 100. + # If the scan is in queue, the value is 0. + # If the scan is running, the value ranges from 0 to 100. + # If the scan is finished, the value is 100. + # @!attribute [rw] error_trace + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRunErrorTrace] + # If result_state is an ERROR, this field provides the primary reason for + # scan's termination and more details, if such are available. + # @!attribute [rw] warning_traces + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanRunWarningTrace>] + # A list of warnings, if such are encountered during this scan run. + class ScanRun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Types of ScanRun execution state. + module ExecutionState + # Represents an invalid state caused by internal server error. This value + # should never be returned. + EXECUTION_STATE_UNSPECIFIED = 0 + + # The scan is waiting in the queue. + QUEUED = 1 + + # The scan is in progress. + SCANNING = 2 + + # The scan is either finished or stopped by user. + FINISHED = 3 + end + + # Types of ScanRun result state. + module ResultState + # Default value. This value is returned when the ScanRun is not yet + # finished. + RESULT_STATE_UNSPECIFIED = 0 + + # The scan finished without errors. + SUCCESS = 1 + + # The scan finished with errors. + ERROR = 2 + + # The scan was terminated by user. + KILLED = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb new file mode 100644 index 000000000000..9a4290f473e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.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 WebSecurityScanner + module V1beta + # Output only. + # Defines an error trace message for a ScanRun. + # @!attribute [rw] code + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRunErrorTrace::Code] + # Indicates the error reason code. + # @!attribute [rw] scan_config_error + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfigError] + # If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error + # message encountered during scan configuration validation that is performed + # before each scan run. + # @!attribute [rw] most_common_http_error_code + # @return [::Integer] + # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most + # common HTTP error code, if such is available. For example, if this code is + # 404, the scan has encountered too many NOT_FOUND responses. + class ScanRunErrorTrace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. + # Defines an error reason code. + # Next id: 7 + module Code + # Default value is never used. + CODE_UNSPECIFIED = 0 + + # Indicates that the scan run failed due to an internal server error. + INTERNAL_ERROR = 1 + + # Indicates a scan configuration error, usually due to outdated ScanConfig + # settings, such as starting_urls or the DNS configuration. + SCAN_CONFIG_ISSUE = 2 + + # Indicates an authentication error, usually due to outdated ScanConfig + # authentication settings. + AUTHENTICATION_CONFIG_ISSUE = 3 + + # Indicates a scan operation timeout, usually caused by a very large site. + TIMED_OUT_WHILE_SCANNING = 4 + + # Indicates that a scan encountered excessive redirects, either to + # authentication or some other page outside of the scan scope. + TOO_MANY_REDIRECTS = 5 + + # Indicates that a scan encountered numerous errors from the web site + # pages. When available, most_common_http_error_code field indicates the + # most common HTTP error code encountered during the scan. + TOO_MANY_HTTP_ERRORS = 6 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb new file mode 100644 index 000000000000..14ef8134f765 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1beta + # Output only. + # Defines a warning trace message for ScanRun. Warning traces provide customers + # with useful information that helps make the scanning process more effective. + # @!attribute [rw] code + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRunWarningTrace::Code] + # Indicates the warning code. + class ScanRunWarningTrace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Output only. + # Defines a warning message code. + # Next id: 6 + module Code + # Default value is never used. + CODE_UNSPECIFIED = 0 + + # Indicates that a scan discovered an unexpectedly low number of URLs. This + # is sometimes caused by complex navigation features or by using a single + # URL for numerous pages. + INSUFFICIENT_CRAWL_RESULTS = 1 + + # Indicates that a scan discovered too many URLs to test, or excessive + # redundant URLs. + TOO_MANY_CRAWL_RESULTS = 2 + + # Indicates that too many tests have been generated for the scan. Customer + # should try reducing the number of starting URLs, increasing the QPS rate, + # or narrowing down the scope of the scan using the excluded patterns. + TOO_MANY_FUZZ_TASKS = 3 + + # Indicates that a scan is blocked by IAP. + BLOCKED_BY_IAP = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb new file mode 100644 index 000000000000..5c0a8825ce30 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb @@ -0,0 +1,278 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + module V1beta + # Request for the `CreateScanConfig` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name where the scan is created, which should be a + # project resource name in the format 'projects/\\{projectId}'. + # @!attribute [rw] scan_config + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # Required. The ScanConfig to be created. + class CreateScanConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteScanConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanConfig to be deleted. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + class DeleteScanConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetScanConfig` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanConfig to be returned. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + class GetScanConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListScanConfigs` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a project resource name in the + # format 'projects/\\{projectId}'. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of ScanConfigs to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + class ListScanConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateScanConfigRequest` method. + # @!attribute [rw] scan_config + # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] + # Required. The ScanConfig to be updated. The name field must be set to identify the + # resource to be updated. The values of fields not covered by the mask + # will be ignored. + # @!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 UpdateScanConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListScanConfigs` method. + # @!attribute [rw] scan_configs + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] + # The list of ScanConfigs returned. + # @!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 ListScanConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `StartScanRun` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanConfig to be used. The name follows the + # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + class StartScanRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetScanRun` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanRun to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + class GetScanRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListScanRuns` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a scan resource name in the + # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of ScanRuns to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + class ListScanRunsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListScanRuns` method. + # @!attribute [rw] scan_runs + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] + # The list of ScanRuns returned. + # @!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 ListScanRunsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `StopScanRun` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the ScanRun to be stopped. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + class StopScanRunRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListCrawledUrls` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of CrawledUrls to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + class ListCrawledUrlsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListCrawledUrls` method. + # @!attribute [rw] crawled_urls + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] + # The list of CrawledUrls returned. + # @!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 ListCrawledUrlsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetFinding` method. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Finding to be returned. The name follows the + # format of + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. + class GetFindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListFindings` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + # @!attribute [rw] filter + # @return [::String] + # Required. The filter expression. The expression must be in the format: + # . + # Supported field: 'finding_type'. + # Supported operator: '='. + # @!attribute [rw] page_token + # @return [::String] + # A token identifying a page of results to be returned. This should be a + # `next_page_token` value returned from a previous List request. + # If unspecified, the first page of results is returned. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of Findings to return, can be limited by server. + # If not specified or not positive, the implementation will select a + # reasonable value. + class ListFindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListFindings` method. + # @!attribute [rw] findings + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] + # The list of Findings returned. + # @!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 ListFindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListFindingTypeStats` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name, which should be a scan run resource name in the + # format + # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. + class ListFindingTypeStatsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListFindingTypeStats` method. + # @!attribute [rw] finding_type_stats + # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::FindingTypeStats>] + # The list of FindingTypeStats returned. + class ListFindingTypeStatsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..2cf622627fe6 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta", path: "../" +else + gem "google-cloud-web_security_scanner-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-web_security_scanner-v1beta/snippets/snippet_metadata_google.cloud.websecurityscanner.v1beta.json b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/snippet_metadata_google.cloud.websecurityscanner.v1beta.json new file mode 100644 index 000000000000..3f5379593bc8 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/snippet_metadata_google.cloud.websecurityscanner.v1beta.json @@ -0,0 +1,535 @@ +{ + "client_library": { + "name": "google-cloud-web_security_scanner-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.websecurityscanner.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_CreateScanConfig_sync", + "title": "Snippet for the create_scan_config call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#create_scan_config.", + "file": "web_security_scanner/create_scan_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_scan_config", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#create_scan_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "CreateScanConfig", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.CreateScanConfig", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_DeleteScanConfig_sync", + "title": "Snippet for the delete_scan_config call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#delete_scan_config.", + "file": "web_security_scanner/delete_scan_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_scan_config", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#delete_scan_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "DeleteScanConfig", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.DeleteScanConfig", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanConfig_sync", + "title": "Snippet for the get_scan_config call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_config.", + "file": "web_security_scanner/get_scan_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scan_config", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "GetScanConfig", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.GetScanConfig", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanConfigs_sync", + "title": "Snippet for the list_scan_configs call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_configs.", + "file": "web_security_scanner/list_scan_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scan_configs", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListScanConfigs", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListScanConfigs", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_UpdateScanConfig_sync", + "title": "Snippet for the update_scan_config call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#update_scan_config.", + "file": "web_security_scanner/update_scan_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_scan_config", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#update_scan_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "UpdateScanConfig", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.UpdateScanConfig", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_StartScanRun_sync", + "title": "Snippet for the start_scan_run call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#start_scan_run.", + "file": "web_security_scanner/start_scan_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_scan_run", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#start_scan_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanRun", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "StartScanRun", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.StartScanRun", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanRun_sync", + "title": "Snippet for the get_scan_run call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_run.", + "file": "web_security_scanner/get_scan_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_scan_run", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanRun", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "GetScanRun", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.GetScanRun", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanRuns_sync", + "title": "Snippet for the list_scan_runs call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_runs.", + "file": "web_security_scanner/list_scan_runs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_scan_runs", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_runs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListScanRuns", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListScanRuns", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_StopScanRun_sync", + "title": "Snippet for the stop_scan_run call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#stop_scan_run.", + "file": "web_security_scanner/stop_scan_run.rb", + "language": "RUBY", + "client_method": { + "short_name": "stop_scan_run", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#stop_scan_run", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanRun", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "StopScanRun", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.StopScanRun", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListCrawledUrls_sync", + "title": "Snippet for the list_crawled_urls call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_crawled_urls.", + "file": "web_security_scanner/list_crawled_urls.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_crawled_urls", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_crawled_urls", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListCrawledUrls", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListCrawledUrls", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_GetFinding_sync", + "title": "Snippet for the get_finding call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_finding.", + "file": "web_security_scanner/get_finding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_finding", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_finding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::Finding", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "GetFinding", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.GetFinding", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindings_sync", + "title": "Snippet for the list_findings call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_findings.", + "file": "web_security_scanner/list_findings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_findings", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_findings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListFindings", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListFindings", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindingTypeStats_sync", + "title": "Snippet for the list_finding_type_stats call in the WebSecurityScanner service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_finding_type_stats.", + "file": "web_security_scanner/list_finding_type_stats.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_finding_type_stats", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_finding_type_stats", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse", + "client": { + "short_name": "WebSecurityScanner::Client", + "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" + }, + "method": { + "short_name": "ListFindingTypeStats", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListFindingTypeStats", + "service": { + "short_name": "WebSecurityScanner", + "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" + } + } + }, + "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-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb new file mode 100644 index 000000000000..72531ba34f7c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_CreateScanConfig_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the create_scan_config call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#create_scan_config. +# +def create_scan_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new + + # Call the create_scan_config method. + result = client.create_scan_config request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. + p result +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_CreateScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb new file mode 100644 index 000000000000..4edf65f51798 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_DeleteScanConfig_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the delete_scan_config call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#delete_scan_config. +# +def delete_scan_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new + + # Call the delete_scan_config method. + result = client.delete_scan_config request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_DeleteScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb new file mode 100644 index 000000000000..31b8a781be9a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START websecurityscanner_v1beta_generated_WebSecurityScanner_GetFinding_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the get_finding call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_finding. +# +def get_finding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new + + # Call the get_finding method. + result = client.get_finding request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::Finding. + p result +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetFinding_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb new file mode 100644 index 000000000000..54d205419154 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanConfig_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the get_scan_config call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_config. +# +def get_scan_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new + + # Call the get_scan_config method. + result = client.get_scan_config request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. + p result +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb new file mode 100644 index 000000000000..849242e39e6a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanRun_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the get_scan_run call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_run. +# +def get_scan_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new + + # Call the get_scan_run method. + result = client.get_scan_run request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. + p result +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb new file mode 100644 index 000000000000..5909d290f3fe --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START websecurityscanner_v1beta_generated_WebSecurityScanner_ListCrawledUrls_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the list_crawled_urls call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_crawled_urls. +# +def list_crawled_urls + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new + + # Call the list_crawled_urls method. + result = client.list_crawled_urls request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl. + p item + end +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListCrawledUrls_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb new file mode 100644 index 000000000000..c3c3e83e332a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindingTypeStats_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the list_finding_type_stats call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_finding_type_stats. +# +def list_finding_type_stats + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new + + # Call the list_finding_type_stats method. + result = client.list_finding_type_stats request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse. + p result +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindingTypeStats_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb new file mode 100644 index 000000000000..942fcec7e55d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindings_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the list_findings call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_findings. +# +def list_findings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new + + # Call the list_findings method. + result = client.list_findings request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::Finding. + p item + end +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb new file mode 100644 index 000000000000..654d77988f2c --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanConfigs_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the list_scan_configs call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_configs. +# +def list_scan_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new + + # Call the list_scan_configs method. + result = client.list_scan_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::WebSecurityScanner::V1beta::ScanConfig. + p item + end +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanConfigs_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb new file mode 100644 index 000000000000..37835b22f132 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanRuns_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the list_scan_runs call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_runs. +# +def list_scan_runs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new + + # Call the list_scan_runs method. + result = client.list_scan_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::WebSecurityScanner::V1beta::ScanRun. + p item + end +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanRuns_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb new file mode 100644 index 000000000000..645b424b6b29 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_StartScanRun_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the start_scan_run call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#start_scan_run. +# +def start_scan_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new + + # Call the start_scan_run method. + result = client.start_scan_run request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. + p result +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_StartScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb new file mode 100644 index 000000000000..894d270fec3b --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_StopScanRun_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the stop_scan_run call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#stop_scan_run. +# +def stop_scan_run + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new + + # Call the stop_scan_run method. + result = client.stop_scan_run request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. + p result +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_StopScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb new file mode 100644 index 000000000000..7803724b8906 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_UpdateScanConfig_sync] +require "google/cloud/web_security_scanner/v1beta" + +## +# Snippet for the update_scan_config call in the WebSecurityScanner service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#update_scan_config. +# +def update_scan_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new + + # Call the update_scan_config method. + result = client.update_scan_config request + + # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. + p result +end +# [END websecurityscanner_v1beta_generated_WebSecurityScanner_UpdateScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb new file mode 100644 index 000000000000..8b06894bb244 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_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/web_security_scanner/v1beta/web_security_scanner" + +class ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_finding_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.finding_path project: "value0", scan_config: "value1", scan_run: "value2", finding: "value3" + assert_equal "projects/value0/scanConfigs/value1/scanRuns/value2/findings/value3", 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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.scan_config_path project: "value0", scan_config: "value1" + assert_equal "projects/value0/scanConfigs/value1", path + end + end + + def test_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.scan_run_path project: "value0", scan_config: "value1", scan_run: "value2" + assert_equal "projects/value0/scanConfigs/value1/scanRuns/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb new file mode 100644 index 000000000000..2fe56ab000a3 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb @@ -0,0 +1,812 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/websecurityscanner/v1beta/web_security_scanner_pb" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" + + +class ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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_scan_config + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scan_config = {} + + create_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_create_scan_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_scan_config({ parent: parent, scan_config: scan_config }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_scan_config parent: parent, scan_config: scan_config do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_scan_config({ parent: parent, scan_config: scan_config }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_scan_config_client_stub.call_count + end + end + end + + def test_delete_scan_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_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_delete_scan_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_scan_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_scan_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_scan_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_scan_config_client_stub.call_count + end + end + end + + def test_get_scan_config + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_scan_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scan_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scan_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scan_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scan_config_client_stub.call_count + end + end + end + + def test_list_scan_configs + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse.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_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_scan_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scan_configs_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scan_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scan_configs ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_scan_configs(::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.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_scan_configs_client_stub.call_count + end + end + end + + def test_update_scan_config + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + scan_config = {} + update_mask = {} + + update_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_update_scan_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_scan_config scan_config: scan_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new(scan_config: scan_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new(scan_config: scan_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_scan_config_client_stub.call_count + end + end + end + + def test_start_scan_run + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + start_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_start_scan_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_scan_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_scan_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_scan_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_scan_run_client_stub.call_count + end + end + end + + def test_get_scan_run + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_scan_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_scan_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_scan_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_scan_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_scan_run_client_stub.call_count + end + end + end + + def test_list_scan_runs + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse.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_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_scan_runs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_scan_runs_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_scan_runs parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_scan_runs ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_scan_runs(::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.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_scan_runs_client_stub.call_count + end + end + end + + def test_stop_scan_run + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + stop_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_stop_scan_run_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stop_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.stop_scan_run({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.stop_scan_run name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.stop_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.stop_scan_run({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.stop_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, stop_scan_run_client_stub.call_count + end + end + end + + def test_list_crawled_urls + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse.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_crawled_urls_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_crawled_urls_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_crawled_urls_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_crawled_urls parent: parent, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_crawled_urls ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_crawled_urls(::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.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_crawled_urls_client_stub.call_count + end + end + end + + def test_get_finding + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::Finding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_finding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_finding_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_finding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_finding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_finding ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_finding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_finding(::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_finding_client_stub.call_count + end + end + end + + def test_list_findings + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_findings parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_findings ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_findings(::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_count + end + end + end + + def test_list_finding_type_stats + # Create test objects. + client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_finding_type_stats_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_finding_type_stats_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_finding_type_stats_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_finding_type_stats({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_finding_type_stats parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_finding_type_stats ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_finding_type_stats({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_finding_type_stats(::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_finding_type_stats_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::WebSecurityScanner::V1beta::WebSecurityScanner::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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb new file mode 100644 index 000000000000..25a2ab5f9477 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb @@ -0,0 +1,900 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/websecurityscanner/v1beta/web_security_scanner_pb" +require "google/cloud/web_security_scanner/v1beta/web_security_scanner" + +class ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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_scan_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + scan_config = {} + + create_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_scan_config, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig), request["scan_config"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_scan_config({ parent: parent, scan_config: scan_config }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_scan_config parent: parent, scan_config: scan_config do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_scan_config({ parent: parent, scan_config: scan_config }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_scan_config_client_stub.call_rpc_count + end + end + + def test_delete_scan_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_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_scan_config, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_scan_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_scan_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_scan_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new(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_scan_config_client_stub.call_rpc_count + end + end + + def test_get_scan_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scan_config, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scan_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scan_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scan_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_scan_config_client_stub.call_rpc_count + end + end + + def test_list_scan_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_scan_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scan_configs, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest, 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_scan_configs_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_scan_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_scan_configs ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_scan_configs(::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.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_scan_configs_client_stub.call_rpc_count + end + end + + def test_update_scan_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + scan_config = {} + update_mask = {} + + update_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_scan_config, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig), request["scan_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_scan_config_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_scan_config scan_config: scan_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new(scan_config: scan_config, update_mask: update_mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_scan_config({ scan_config: scan_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 + client.update_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new(scan_config: scan_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_scan_config_client_stub.call_rpc_count + end + end + + def test_start_scan_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_scan_run, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_scan_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_scan_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_scan_run({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new(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_scan_run_client_stub.call_rpc_count + end + end + + def test_get_scan_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_scan_run, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_scan_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_scan_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_scan_run({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_scan_run_client_stub.call_rpc_count + end + end + + def test_list_scan_runs + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_scan_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_scan_runs, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest, 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_scan_runs_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_scan_runs parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_scan_runs ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_scan_runs(::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.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_scan_runs_client_stub.call_rpc_count + end + end + + def test_stop_scan_run + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :stop_scan_run, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stop_scan_run_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stop_scan_run({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.stop_scan_run name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.stop_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.stop_scan_run({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.stop_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, stop_scan_run_client_stub.call_rpc_count + end + end + + def test_list_crawled_urls + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = 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_crawled_urls_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_crawled_urls, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest, 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_crawled_urls_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_crawled_urls parent: parent, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_crawled_urls ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_crawled_urls(::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.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_crawled_urls_client_stub.call_rpc_count + end + end + + def test_get_finding + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::Finding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_finding, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_finding_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_finding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_finding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_finding ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_finding({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_finding(::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_finding_client_stub.call_rpc_count + end + end + + def test_list_findings + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + filter = "hello world" + page_token = "hello world" + page_size = 42 + + list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_findings, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_findings_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_findings parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_findings ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_findings(::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_findings_client_stub.call_rpc_count + end + end + + def test_list_finding_type_stats + # Create GRPC objects. + grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_finding_type_stats_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_finding_type_stats, name + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_finding_type_stats_client_stub do + # Create client + client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_finding_type_stats({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_finding_type_stats parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_finding_type_stats ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_finding_type_stats({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_finding_type_stats(::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_finding_type_stats_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::WebSecurityScanner::V1beta::WebSecurityScanner::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::WebSecurityScanner::V1beta::WebSecurityScanner::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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_security_scanner/.gitignore b/owl-bot-staging/google-cloud-web_security_scanner/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-web_security_scanner/.repo-metadata.json b/owl-bot-staging/google-cloud-web_security_scanner/.repo-metadata.json new file mode 100644 index 000000000000..dfc1121d66d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "websecurityscanner.googleapis.com", + "api_shortname": "websecurityscanner", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner/latest", + "distribution_name": "google-cloud-web_security_scanner", + "is_cloud": true, + "language": "ruby", + "name": "websecurityscanner", + "name_pretty": "Web Security Scanner API", + "product_documentation": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities.", + "ruby-cloud-env-prefix": "WEB_SECURITY_SCANNER", + "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-web_security_scanner/.rubocop.yml b/owl-bot-staging/google-cloud-web_security_scanner/.rubocop.yml new file mode 100644 index 000000000000..6eb251abd513 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-web_security_scanner.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-cloud-web_security_scanner.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-web_security_scanner/.toys.rb b/owl-bot-staging/google-cloud-web_security_scanner/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/.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-web_security_scanner/.yardopts b/owl-bot-staging/google-cloud-web_security_scanner/.yardopts new file mode 100644 index 000000000000..c7306527682d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Web Security Scanner API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-web_security_scanner/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_security_scanner/AUTHENTICATION.md new file mode 100644 index 000000000000..3643ec6213db --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-web_security_scanner 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-web_security_scanner 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/web_security_scanner" + +client = Google::Cloud::WebSecurityScanner.web_security_scanner do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/web_security_scanner" + +Google::Cloud::WebSecurityScanner.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::WebSecurityScanner.web_security_scanner +``` + +### 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-web_security_scanner +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/web_security_scanner" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::WebSecurityScanner.web_security_scanner +``` + +### 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-web_security_scanner/CHANGELOG.md b/owl-bot-staging/google-cloud-web_security_scanner/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-web_security_scanner/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner/Gemfile new file mode 100644 index 000000000000..3f31cd6feb85 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-web_security_scanner-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-web_security_scanner.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_security_scanner/LICENSE.md b/owl-bot-staging/google-cloud-web_security_scanner/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/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-web_security_scanner/README.md b/owl-bot-staging/google-cloud-web_security_scanner/README.md new file mode 100644 index 000000000000..92aa0e027e3f --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Web Security Scanner API + +API Client library for the Web Security Scanner API + +Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-web_security_scanner-v*`. +The gem `google-cloud-web_security_scanner` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner/latest) +for this library, google-cloud-web_security_scanner, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-web_security_scanner-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-web_security_scanner +``` + +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/websecurityscanner.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/web_security_scanner" + +client = Google::Cloud::WebSecurityScanner.web_security_scanner +request = ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new # (request fields as keyword arguments...) +response = client.create_scan_config request +``` + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-web_security_scanner-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-web_security_scanner`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-web_security_scanner-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-web_security_scanner`. +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-web_security_scanner-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-web_security_scanner/Rakefile b/owl-bot-staging/google-cloud-web_security_scanner/Rakefile new file mode 100644 index 000000000000..5a691367e9a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-web_security_scanner acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WEB_SECURITY_SCANNER_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WEB_SECURITY_SCANNER_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 WEB_SECURITY_SCANNER_TEST_PROJECT=test123 WEB_SECURITY_SCANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials" + ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WEB_SECURITY_SCANNER_PROJECT"] = project + ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] = project + ENV["WEB_SECURITY_SCANNER_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-web_security_scanner 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-web_security_scanner 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-web_security_scanner 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-web_security_scanner gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-web_security_scanner" + header "google-cloud-web_security_scanner rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-web_security_scanner yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-web_security_scanner 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-web_security_scanner 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-web_security_scanner 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-web_security_scanner/google-cloud-web_security_scanner.gemspec b/owl-bot-staging/google-cloud-web_security_scanner/google-cloud-web_security_scanner.gemspec new file mode 100644 index 000000000000..894eb3dc0ac2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/google-cloud-web_security_scanner.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/web_security_scanner/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-web_security_scanner" + gem.version = Google::Cloud::WebSecurityScanner::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities." + gem.summary = "API Client library for the Web Security Scanner API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-web_security_scanner-v1", "~> 1.2" +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner/lib/google-cloud-web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner/lib/google-cloud-web_security_scanner.rb new file mode 100644 index 000000000000..e947e723891d --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/lib/google-cloud-web_security_scanner.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/web_security_scanner" unless defined? Google::Cloud::WebSecurityScanner::VERSION diff --git a/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner.rb new file mode 100644 index 000000000000..97bf39b654f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/web_security_scanner/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :web_security_scanner do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module WebSecurityScanner + ## + # Create a new client object for WebSecurityScanner. + # + # By default, this returns an instance of + # [Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest/Google-Cloud-WebSecurityScanner-V1-WebSecurityScanner-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the WebSecurityScanner service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the WebSecurityScanner service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::WebSecurityScanner.web_security_scanner_available?}. + # + # ## About WebSecurityScanner + # + # Web Security Scanner Service identifies security vulnerabilities in web + # applications hosted on Google Cloud. It crawls your application, and + # attempts to exercise as many user inputs and event handlers as possible. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.web_security_scanner version: :v1, transport: :grpc, &block + require "google/cloud/web_security_scanner/#{version.to_s.downcase}" + + package_name = Google::Cloud::WebSecurityScanner + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::WebSecurityScanner.const_get(package_name).const_get(:WebSecurityScanner) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the WebSecurityScanner service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::WebSecurityScanner.web_security_scanner}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the WebSecurityScanner service, + # or if the versioned client gem needs an update to support the WebSecurityScanner service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.web_security_scanner_available? version: :v1, transport: :grpc + require "google/cloud/web_security_scanner/#{version.to_s.downcase}" + package_name = Google::Cloud::WebSecurityScanner + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::WebSecurityScanner.const_get package_name + return false unless service_module.const_defined? :WebSecurityScanner + service_module = service_module.const_get :WebSecurityScanner + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-web_security_scanner library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.web_security_scanner if block_given? + + ::Google::Cloud.configure.web_security_scanner + end + end + end +end + +helper_path = ::File.join __dir__, "web_security_scanner", "helpers.rb" +require "google/cloud/web_security_scanner/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner/version.rb b/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner/version.rb new file mode 100644 index 000000000000..7a2e86278151 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module WebSecurityScanner + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/client_test.rb b/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/client_test.rb new file mode 100644 index 000000000000..9e2214b9193a --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/web_security_scanner" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::WebSecurityScanner::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_web_security_scanner_grpc + skip unless Google::Cloud::WebSecurityScanner.web_security_scanner_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::WebSecurityScanner.web_security_scanner transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client, client + end + end + + def test_web_security_scanner_rest + skip unless Google::Cloud::WebSecurityScanner.web_security_scanner_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::WebSecurityScanner.web_security_scanner transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/version_test.rb b/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/version_test.rb new file mode 100644 index 000000000000..41a6555f0a05 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/web_security_scanner/version" + +class Google::Cloud::WebSecurityScanner::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::WebSecurityScanner::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-web_security_scanner/test/helper.rb b/owl-bot-staging/google-cloud-web_security_scanner/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-web_security_scanner/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows-executions-v1/.repo-metadata.json new file mode 100644 index 000000000000..29631f032d47 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "workflowexecutions.googleapis.com", + "api_shortname": "workflowexecutions", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest", + "distribution_name": "google-cloud-workflows-executions-v1", + "is_cloud": true, + "language": "ruby", + "name": "workflowexecutions", + "name_pretty": "Workflows Executions V1 API", + "product_documentation": "https://cloud.google.com/workflows/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-executions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details.", + "ruby-cloud-env-prefix": "WORKFLOWS", + "ruby-cloud-product-url": "https://cloud.google.com/workflows/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.rubocop.yml b/owl-bot-staging/google-cloud-workflows-executions-v1/.rubocop.yml new file mode 100644 index 000000000000..ba04c515e3d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workflows-executions-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-workflows-executions-v1.rb" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.toys.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/.yardopts b/owl-bot-staging/google-cloud-workflows-executions-v1/.yardopts new file mode 100644 index 000000000000..f0b454dc3245 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Workflows Executions 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-workflows-executions-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows-executions-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..73a695e2f97f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workflows-executions-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-workflows-executions-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/workflows/executions/v1" + +client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workflows/executions/v1" + +::Google::Cloud::Workflows::Executions::V1::Executions::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Workflows::Executions::V1::Executions::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-workflows-executions-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/workflows/executions/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Workflows::Executions::V1::Executions::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-workflows-executions-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows-executions-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile b/owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/LICENSE.md b/owl-bot-staging/google-cloud-workflows-executions-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/README.md b/owl-bot-staging/google-cloud-workflows-executions-v1/README.md new file mode 100644 index 000000000000..1fad0660e45e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Workflows Executions V1 API + +Execute workflows created with Workflows API. + +Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Workflows Executions V1 API. Most users should consider using +the main client gem, +[google-cloud-workflows](https://rubygems.org/gems/google-cloud-workflows). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-workflows-executions-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/workflowexecutions.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/workflows/executions/v1" + +client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new +request = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new # (request fields as keyword arguments...) +response = client.list_executions request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/workflows/) +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/workflows/executions/v1" +require "logger" + +client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workflows`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workflows-executions-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-workflows`. +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-workflows-executions-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-workflows-executions-v1/Rakefile b/owl-bot-staging/google-cloud-workflows-executions-v1/Rakefile new file mode 100644 index 000000000000..44509fa79f79 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WORKFLOWS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WORKFLOWS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/workflows/executions/v1/executions/credentials" + ::Google::Cloud::Workflows::Executions::V1::Executions::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WORKFLOWS_PROJECT"] = project + ENV["WORKFLOWS_TEST_PROJECT"] = project + ENV["WORKFLOWS_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-workflows-executions-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-workflows-executions-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-workflows-executions-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-workflows-executions-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workflows-executions-v1" + header "google-cloud-workflows-executions-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workflows-executions-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workflows-executions-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-workflows-executions-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-workflows-executions-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-workflows-executions-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-workflows-executions-v1/gapic_metadata.json new file mode 100644 index 000000000000..7c61feeebf2d --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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.workflows.executions.v1", + "libraryPackage": "::Google::Cloud::Workflows::Executions::V1", + "services": { + "Executions": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Workflows::Executions::V1::Executions::Client", + "rpcs": { + "ListExecutions": { + "methods": [ + "list_executions" + ] + }, + "CreateExecution": { + "methods": [ + "create_execution" + ] + }, + "GetExecution": { + "methods": [ + "get_execution" + ] + }, + "CancelExecution": { + "methods": [ + "cancel_execution" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/google-cloud-workflows-executions-v1.gemspec b/owl-bot-staging/google-cloud-workflows-executions-v1/google-cloud-workflows-executions-v1.gemspec new file mode 100644 index 000000000000..1e05a1b2b58e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/google-cloud-workflows-executions-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workflows/executions/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workflows-executions-v1" + gem.version = Google::Cloud::Workflows::Executions::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-executions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details." + gem.summary = "Execute workflows created with Workflows API." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb new file mode 100644 index 000000000000..fc4b162a318b --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-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/workflows/executions/v1" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb new file mode 100644 index 000000000000..3c540505d083 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/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/workflows/executions/v1/executions" +require "google/cloud/workflows/executions/v1/version" + +module Google + module Cloud + module Workflows + module Executions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/workflows/executions/v1" + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/workflows/executions/v1" + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/workflows/executions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb new file mode 100644 index 000000000000..b39a54aa895b --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.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/workflows/executions/v1/version" + +require "google/cloud/workflows/executions/v1/executions/credentials" +require "google/cloud/workflows/executions/v1/executions/paths" +require "google/cloud/workflows/executions/v1/executions/client" +require "google/cloud/workflows/executions/v1/executions/rest" + +module Google + module Cloud + module Workflows + module Executions + module V1 + ## + # Executions is used to start and manage running instances of + # [Workflows][google.cloud.workflows.v1.Workflow] called executions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/workflows/executions/v1/executions" + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/workflows/executions/v1/executions/rest" + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new + # + module Executions + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "executions", "helpers.rb" +require "google/cloud/workflows/executions/v1/executions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb new file mode 100644 index 000000000000..96f7f1a299d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb @@ -0,0 +1,802 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/workflows/executions/v1/executions_pb" + +module Google + module Cloud + module Workflows + module Executions + module V1 + module Executions + ## + # Client for the Executions service. + # + # Executions is used to start and manage running instances of + # [Workflows][google.cloud.workflows.v1.Workflow] called executions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflowexecutions.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :executions_stub + + ## + # Configure the Executions Client class. + # + # See {::Google::Cloud::Workflows::Executions::V1::Executions::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Executions clients + # ::Google::Cloud::Workflows::Executions::V1::Executions::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workflows", "Executions", "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 Executions Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workflows::Executions::V1::Executions::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @executions_stub.universe_domain + end + + ## + # Create a new Executions client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Executions 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/workflows/executions/v1/executions_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 + + @executions_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Workflows::Executions::V1::Executions::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 + ) + + @executions_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 + @executions_stub.logger + end + + # Service calls + + ## + # Returns a list of executions which belong to the workflow with + # the given name. The method returns executions of all workflow + # revisions. Returned executions are ordered by their start time (newest + # first). + # + # @overload list_executions(request, options = nil) + # Pass arguments to `list_executions` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_executions(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil, order_by: nil) + # Pass arguments to `list_executions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the workflow for which the executions should be listed. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @param page_size [::Integer] + # Maximum number of executions to return per call. + # Max supported value depends on the selected Execution view: it's 1000 for + # BASIC and 100 for FULL. The default value used if the field is not + # specified is 100, regardless of the selected view. Values greater than + # the max value will be coerced down to it. + # @param page_token [::String] + # A page token, received from a previous `ListExecutions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListExecutions` must + # match the call that provided the page token. + # + # Note that pagination is applied to dynamic data. The list of executions + # returned can change between page requests. + # @param view [::Google::Cloud::Workflows::Executions::V1::ExecutionView] + # Optional. A view defining which fields should be filled in the returned + # executions. The API will default to the BASIC view. + # @param filter [::String] + # Optional. Filters applied to the [Executions.ListExecutions] results. + # The following fields are supported for filtering: + # executionID, state, startTime, endTime, duration, workflowRevisionID, + # stepName, and label. + # @param order_by [::String] + # Optional. The ordering applied to the [Executions.ListExecutions] results. + # By default the ordering is based on descending start time. + # The following fields are supported for order by: + # executionID, startTime, endTime, duration, state, and workflowRevisionID. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1::Execution>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1::Execution>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new + # + # # Call the list_executions method. + # result = client.list_executions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workflows::Executions::V1::Execution. + # p item + # end + # + def list_executions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_executions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_executions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_executions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.call_rpc :list_executions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @executions_stub, :list_executions, request, response, 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 execution using the latest revision of the given workflow. + # + # @overload create_execution(request, options = nil) + # Pass arguments to `create_execution` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_execution(parent: nil, execution: nil) + # Pass arguments to `create_execution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the workflow for which an execution should be created. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # The latest revision of the workflow will be used. + # @param execution [::Google::Cloud::Workflows::Executions::V1::Execution, ::Hash] + # Required. Execution to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workflows::Executions::V1::Execution] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new + # + # # Call the create_execution method. + # result = client.create_execution request + # + # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. + # p result + # + def create_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_execution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_execution.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.call_rpc :create_execution, request, 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 an execution of the given name. + # + # @overload get_execution(request, options = nil) + # Pass arguments to `get_execution` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_execution(name: nil, view: nil) + # Pass arguments to `get_execution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the execution to be retrieved. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # @param view [::Google::Cloud::Workflows::Executions::V1::ExecutionView] + # Optional. A view defining which fields should be filled in the returned + # execution. The API will default to the FULL view. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workflows::Executions::V1::Execution] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new + # + # # Call the get_execution method. + # result = client.get_execution request + # + # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. + # p result + # + def get_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_execution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_execution.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.call_rpc :get_execution, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancels an execution of the given name. + # + # @overload cancel_execution(request, options = nil) + # Pass arguments to `cancel_execution` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_execution(name: nil) + # Pass arguments to `cancel_execution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the execution to be cancelled. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workflows::Executions::V1::Execution] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new + # + # # Call the cancel_execution method. + # result = client.cancel_execution request + # + # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. + # p result + # + def cancel_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest + + # Converts hash and nil to 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_execution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_execution.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.call_rpc :cancel_execution, request, 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 Executions API. + # + # This class represents the configuration for Executions, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Workflows::Executions::V1::Executions::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_executions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workflows::Executions::V1::Executions::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_executions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_executions.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Workflows::Executions::V1::Executions::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflowexecutions.googleapis.com" + + config_attr :endpoint, nil, ::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 Executions API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_executions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_executions + ## + # RPC-specific configuration for `create_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :create_execution + ## + # RPC-specific configuration for `get_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :get_execution + ## + # RPC-specific configuration for `cancel_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_execution + + # @private + def initialize parent_rpcs = nil + list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions + @list_executions = ::Gapic::Config::Method.new list_executions_config + create_execution_config = parent_rpcs.create_execution if parent_rpcs.respond_to? :create_execution + @create_execution = ::Gapic::Config::Method.new create_execution_config + get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution + @get_execution = ::Gapic::Config::Method.new get_execution_config + cancel_execution_config = parent_rpcs.cancel_execution if parent_rpcs.respond_to? :cancel_execution + @cancel_execution = ::Gapic::Config::Method.new cancel_execution_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb new file mode 100644 index 000000000000..6a4511ebd935 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/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 Workflows + module Executions + module V1 + module Executions + # Credentials for the Executions API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "WORKFLOWS_CREDENTIALS", + "WORKFLOWS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "WORKFLOWS_CREDENTIALS_JSON", + "WORKFLOWS_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-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb new file mode 100644 index 000000000000..4cbadc66f285 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Workflows + module Executions + module V1 + module Executions + # Path helper methods for the Executions API. + module Paths + ## + # Create a fully-qualified Execution resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}` + # + # @param project [String] + # @param location [String] + # @param workflow [String] + # @param execution [String] + # + # @return [::String] + def execution_path project:, location:, workflow:, execution: + 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}/executions/#{execution}" + end + + ## + # Create a fully-qualified Workflow 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 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-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb new file mode 100644 index 000000000000..46394ec79f74 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/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/workflows/executions/v1/version" + +require "google/cloud/workflows/executions/v1/executions/credentials" +require "google/cloud/workflows/executions/v1/executions/paths" +require "google/cloud/workflows/executions/v1/executions/rest/client" + +module Google + module Cloud + module Workflows + module Executions + module V1 + ## + # Executions is used to start and manage running instances of + # [Workflows][google.cloud.workflows.v1.Workflow] called executions. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/workflows/executions/v1/executions/rest" + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new + # + module Executions + # 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/workflows/executions/v1/executions/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb new file mode 100644 index 000000000000..7fc0368a6891 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb @@ -0,0 +1,731 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/workflows/executions/v1/executions_pb" +require "google/cloud/workflows/executions/v1/executions/rest/service_stub" + +module Google + module Cloud + module Workflows + module Executions + module V1 + module Executions + module Rest + ## + # REST client for the Executions service. + # + # Executions is used to start and manage running instances of + # [Workflows][google.cloud.workflows.v1.Workflow] called executions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflowexecutions.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :executions_stub + + ## + # Configure the Executions Client class. + # + # See {::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Executions clients + # ::Google::Cloud::Workflows::Executions::V1::Executions::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", "Workflows", "Executions", "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 Executions Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workflows::Executions::V1::Executions::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 + @executions_stub.universe_domain + end + + ## + # Create a new Executions REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Executions 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 + + @executions_stub = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @executions_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 + @executions_stub.logger + end + + # Service calls + + ## + # Returns a list of executions which belong to the workflow with + # the given name. The method returns executions of all workflow + # revisions. Returned executions are ordered by their start time (newest + # first). + # + # @overload list_executions(request, options = nil) + # Pass arguments to `list_executions` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_executions(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil, order_by: nil) + # Pass arguments to `list_executions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the workflow for which the executions should be listed. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @param page_size [::Integer] + # Maximum number of executions to return per call. + # Max supported value depends on the selected Execution view: it's 1000 for + # BASIC and 100 for FULL. The default value used if the field is not + # specified is 100, regardless of the selected view. Values greater than + # the max value will be coerced down to it. + # @param page_token [::String] + # A page token, received from a previous `ListExecutions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListExecutions` must + # match the call that provided the page token. + # + # Note that pagination is applied to dynamic data. The list of executions + # returned can change between page requests. + # @param view [::Google::Cloud::Workflows::Executions::V1::ExecutionView] + # Optional. A view defining which fields should be filled in the returned + # executions. The API will default to the BASIC view. + # @param filter [::String] + # Optional. Filters applied to the [Executions.ListExecutions] results. + # The following fields are supported for filtering: + # executionID, state, startTime, endTime, duration, workflowRevisionID, + # stepName, and label. + # @param order_by [::String] + # Optional. The ordering applied to the [Executions.ListExecutions] results. + # By default the ordering is based on descending start time. + # The following fields are supported for order by: + # executionID, startTime, endTime, duration, state, and workflowRevisionID. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1::Execution>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1::Execution>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new + # + # # Call the list_executions method. + # result = client.list_executions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workflows::Executions::V1::Execution. + # p item + # end + # + def list_executions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_executions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_executions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_executions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.list_executions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @executions_stub, :list_executions, "executions", request, result, 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 execution using the latest revision of the given workflow. + # + # @overload create_execution(request, options = nil) + # Pass arguments to `create_execution` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_execution(parent: nil, execution: nil) + # Pass arguments to `create_execution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the workflow for which an execution should be created. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # The latest revision of the workflow will be used. + # @param execution [::Google::Cloud::Workflows::Executions::V1::Execution, ::Hash] + # Required. Execution to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new + # + # # Call the create_execution method. + # result = client.create_execution request + # + # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. + # p result + # + def create_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest + + # Converts hash and nil to an 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_execution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_execution.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.create_execution request, 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 an execution of the given name. + # + # @overload get_execution(request, options = nil) + # Pass arguments to `get_execution` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_execution(name: nil, view: nil) + # Pass arguments to `get_execution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the execution to be retrieved. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # @param view [::Google::Cloud::Workflows::Executions::V1::ExecutionView] + # Optional. A view defining which fields should be filled in the returned + # execution. The API will default to the FULL view. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new + # + # # Call the get_execution method. + # result = client.get_execution request + # + # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. + # p result + # + def get_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_execution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_execution.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.get_execution request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancels an execution of the given name. + # + # @overload cancel_execution(request, options = nil) + # Pass arguments to `cancel_execution` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_execution(name: nil) + # Pass arguments to `cancel_execution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the execution to be cancelled. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new + # + # # Call the cancel_execution method. + # result = client.cancel_execution request + # + # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. + # p result + # + def cancel_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest + + # Converts hash and nil to an 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_execution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_execution.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.cancel_execution request, 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 Executions REST API. + # + # This class represents the configuration for Executions 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::Workflows::Executions::V1::Executions::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_executions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_executions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_executions.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflowexecutions.googleapis.com" + + config_attr :endpoint, nil, ::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 Executions API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_executions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_executions + ## + # RPC-specific configuration for `create_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :create_execution + ## + # RPC-specific configuration for `get_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :get_execution + ## + # RPC-specific configuration for `cancel_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_execution + + # @private + def initialize parent_rpcs = nil + list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions + @list_executions = ::Gapic::Config::Method.new list_executions_config + create_execution_config = parent_rpcs.create_execution if parent_rpcs.respond_to? :create_execution + @create_execution = ::Gapic::Config::Method.new create_execution_config + get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution + @get_execution = ::Gapic::Config::Method.new get_execution_config + cancel_execution_config = parent_rpcs.cancel_execution if parent_rpcs.respond_to? :cancel_execution + @cancel_execution = ::Gapic::Config::Method.new cancel_execution_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-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb new file mode 100644 index 000000000000..5c82daaa16de --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb @@ -0,0 +1,329 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workflows/executions/v1/executions_pb" + +module Google + module Cloud + module Workflows + module Executions + module V1 + module Executions + module Rest + ## + # REST service stub for the Executions 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_executions REST call + # + # @param request_pb [::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse] + # A result object deserialized from the server's reply + def list_executions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_executions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_executions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse.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_execution REST call + # + # @param request_pb [::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # A result object deserialized from the server's reply + def create_execution request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_execution_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_execution", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workflows::Executions::V1::Execution.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_execution REST call + # + # @param request_pb [::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # A result object deserialized from the server's reply + def get_execution request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_execution_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_execution", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workflows::Executions::V1::Execution.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_execution REST call + # + # @param request_pb [::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # A result object deserialized from the server's reply + def cancel_execution request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_execution_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_execution", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workflows::Executions::V1::Execution.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_executions REST call + # + # @param request_pb [::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_executions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/executions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_execution REST call + # + # @param request_pb [::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest] + # 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_execution_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/executions", + body: "execution", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_execution REST call + # + # @param request_pb [::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_execution_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_execution REST call + # + # @param request_pb [::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest] + # 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_execution_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb new file mode 100644 index 000000000000..20434bf43184 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb @@ -0,0 +1,69 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/workflows/executions/v1/executions.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/workflows/executions/v1/executions.proto\x12$google.cloud.workflows.executions.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x0e\n\tExecution\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x30\n\x08\x64uration\x18\x0c \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12I\n\x05state\x18\x04 \x01(\x0e\x32\x35.google.cloud.workflows.executions.v1.Execution.StateB\x03\xe0\x41\x03\x12\x10\n\x08\x61rgument\x18\x05 \x01(\t\x12\x13\n\x06result\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12I\n\x05\x65rror\x18\x07 \x01(\x0b\x32\x35.google.cloud.workflows.executions.v1.Execution.ErrorB\x03\xe0\x41\x03\x12!\n\x14workflow_revision_id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12T\n\x0e\x63\x61ll_log_level\x18\t \x01(\x0e\x32<.google.cloud.workflows.executions.v1.Execution.CallLogLevel\x12K\n\x06status\x18\n \x01(\x0b\x32\x36.google.cloud.workflows.executions.v1.Execution.StatusB\x03\xe0\x41\x03\x12K\n\x06labels\x18\x0b \x03(\x0b\x32;.google.cloud.workflows.executions.v1.Execution.LabelsEntry\x12T\n\x0bstate_error\x18\r \x01(\x0b\x32:.google.cloud.workflows.executions.v1.Execution.StateErrorB\x03\xe0\x41\x03\x1a\xca\x01\n\x11StackTraceElement\x12\x0c\n\x04step\x18\x01 \x01(\t\x12\x0f\n\x07routine\x18\x02 \x01(\t\x12\\\n\x08position\x18\x03 \x01(\x0b\x32J.google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position\x1a\x38\n\x08Position\x12\x0c\n\x04line\x18\x01 \x01(\x03\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\x03\x12\x0e\n\x06length\x18\x03 \x01(\x03\x1a\x61\n\nStackTrace\x12S\n\x08\x65lements\x18\x01 \x03(\x0b\x32\x41.google.cloud.workflows.executions.v1.Execution.StackTraceElement\x1az\n\x05\x45rror\x12\x0f\n\x07payload\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontext\x18\x02 \x01(\t\x12O\n\x0bstack_trace\x18\x03 \x01(\x0b\x32:.google.cloud.workflows.executions.v1.Execution.StackTrace\x1a\x83\x01\n\x06Status\x12R\n\rcurrent_steps\x18\x01 \x03(\x0b\x32;.google.cloud.workflows.executions.v1.Execution.Status.Step\x1a%\n\x04Step\x12\x0f\n\x07routine\x18\x01 \x01(\t\x12\x0c\n\x04step\x18\x02 \x01(\t\x1a\x99\x01\n\nStateError\x12\x0f\n\x07\x64\x65tails\x18\x01 \x01(\t\x12M\n\x04type\x18\x02 \x01(\x0e\x32?.google.cloud.workflows.executions.v1.Execution.StateError.Type\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tKMS_ERROR\x10\x01\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\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x0f\n\x0bUNAVAILABLE\x10\x05\x12\n\n\x06QUEUED\x10\x06\"d\n\x0c\x43\x61llLogLevel\x12\x1e\n\x1a\x43\x41LL_LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rLOG_ALL_CALLS\x10\x01\x12\x13\n\x0fLOG_ERRORS_ONLY\x10\x02\x12\x0c\n\x08LOG_NONE\x10\x03:\x86\x01\xea\x41\x82\x01\n+workflowexecutions.googleapis.com/Execution\x12Sprojects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}\"\xed\x01\n\x15ListExecutionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x46\n\x04view\x18\x04 \x01(\x0e\x32\x33.google.cloud.workflows.executions.v1.ExecutionViewB\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\"v\n\x16ListExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.google.cloud.workflows.executions.v1.Execution\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9c\x01\n\x16\x43reateExecutionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\x12G\n\texecution\x18\x02 \x01(\x0b\x32/.google.cloud.workflows.executions.v1.ExecutionB\x03\xe0\x41\x02\"\xa0\x01\n\x13GetExecutionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workflowexecutions.googleapis.com/Execution\x12\x46\n\x04view\x18\x02 \x01(\x0e\x32\x33.google.cloud.workflows.executions.v1.ExecutionViewB\x03\xe0\x41\x01\"[\n\x16\x43\x61ncelExecutionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workflowexecutions.googleapis.com/Execution*D\n\rExecutionView\x12\x1e\n\x1a\x45XECUTION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xc3\x07\n\nExecutions\x12\xd8\x01\n\x0eListExecutions\x12;.google.cloud.workflows.executions.v1.ListExecutionsRequest\x1a<.google.cloud.workflows.executions.v1.ListExecutionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/workflows/*}/executions\x12\xe2\x01\n\x0f\x43reateExecution\x12<.google.cloud.workflows.executions.v1.CreateExecutionRequest\x1a/.google.cloud.workflows.executions.v1.Execution\"`\xda\x41\x10parent,execution\x82\xd3\xe4\x93\x02G\":/v1/{parent=projects/*/locations/*/workflows/*}/executions:\texecution\x12\xc5\x01\n\x0cGetExecution\x12\x39.google.cloud.workflows.executions.v1.GetExecutionRequest\x1a/.google.cloud.workflows.executions.v1.Execution\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/workflows/*/executions/*}\x12\xd5\x01\n\x0f\x43\x61ncelExecution\x12<.google.cloud.workflows.executions.v1.CancelExecutionRequest\x1a/.google.cloud.workflows.executions.v1.Execution\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\"A/v1/{name=projects/*/locations/*/workflows/*/executions/*}:cancel:\x01*\x1aU\xca\x41!workflowexecutions.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x01\n(com.google.cloud.workflows.executions.v1B\x0f\x45xecutionsProtoP\x01ZHcloud.google.com/go/workflows/executions/apiv1/executionspb;executionspb\xea\x41\x61\n!workflows.googleapis.com/Workflow\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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb new file mode 100644 index 000000000000..857f5d110040 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb @@ -0,0 +1,369 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Workflows + module Executions + module V1 + # A running instance of a + # [Workflow](/workflows/docs/reference/rest/v1/projects.locations.workflows). + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the execution. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Marks the beginning of execution. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Marks the end of execution, successful or not. + # @!attribute [r] duration + # @return [::Google::Protobuf::Duration] + # Output only. Measures the duration of the execution. + # @!attribute [r] state + # @return [::Google::Cloud::Workflows::Executions::V1::Execution::State] + # Output only. Current state of the execution. + # @!attribute [rw] argument + # @return [::String] + # Input parameters of the execution represented as a JSON string. + # The size limit is 32KB. + # + # *Note*: If you are using the REST API directly to run your workflow, you + # must escape any JSON string value of `argument`. Example: + # `'{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'` + # @!attribute [r] result + # @return [::String] + # Output only. Output of the execution represented as a JSON string. The + # value can only be present if the execution's state is `SUCCEEDED`. + # @!attribute [r] error + # @return [::Google::Cloud::Workflows::Executions::V1::Execution::Error] + # Output only. The error which caused the execution to finish prematurely. + # The value is only present if the execution's state is `FAILED` + # or `CANCELLED`. + # @!attribute [r] workflow_revision_id + # @return [::String] + # Output only. Revision of the workflow this execution is using. + # @!attribute [rw] call_log_level + # @return [::Google::Cloud::Workflows::Executions::V1::Execution::CallLogLevel] + # The call logging level associated to this execution. + # @!attribute [r] status + # @return [::Google::Cloud::Workflows::Executions::V1::Execution::Status] + # Output only. Status tracks the current steps and progress data of this + # execution. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with this execution. + # Labels can contain at most 64 entries. Keys and values can be no longer + # than 63 characters and can only contain lowercase letters, numeric + # characters, underscores, and dashes. Label keys must start with a letter. + # International characters are allowed. + # By default, labels are inherited from the workflow but are overridden by + # any labels associated with the execution. + # @!attribute [r] state_error + # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StateError] + # Output only. Error regarding the state of the Execution resource. For + # example, this field will have error details if the execution data is + # unavailable due to revoked KMS key permissions. + class Execution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single stack element (frame) where an error occurred. + # @!attribute [rw] step + # @return [::String] + # The step the error occurred at. + # @!attribute [rw] routine + # @return [::String] + # The routine where the error occurred. + # @!attribute [rw] position + # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StackTraceElement::Position] + # The source position information of the stack trace element. + class StackTraceElement + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Position contains source position information about the stack trace + # element such as line number, column number and length of the code block + # in bytes. + # @!attribute [rw] line + # @return [::Integer] + # The source code line number the current instruction was generated from. + # @!attribute [rw] column + # @return [::Integer] + # The source code column position (of the line) the current instruction + # was generated from. + # @!attribute [rw] length + # @return [::Integer] + # The number of bytes of source code making up this stack trace element. + class Position + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A collection of stack elements (frames) where an error occurred. + # @!attribute [rw] elements + # @return [::Array<::Google::Cloud::Workflows::Executions::V1::Execution::StackTraceElement>] + # An array of stack elements. + class StackTrace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Error describes why the execution was abnormally terminated. + # @!attribute [rw] payload + # @return [::String] + # Error message and data returned represented as a JSON string. + # @!attribute [rw] context + # @return [::String] + # Human-readable stack trace string. + # @!attribute [rw] stack_trace + # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StackTrace] + # Stack trace with detailed information of where error was generated. + class Error + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the current status of this execution. + # @!attribute [rw] current_steps + # @return [::Array<::Google::Cloud::Workflows::Executions::V1::Execution::Status::Step>] + # A list of currently executing or last executed step names for the + # workflow execution currently running. If the workflow has succeeded or + # failed, this is the last attempted or executed step. Presently, if the + # current step is inside a subworkflow, the list only includes that step. + # In the future, the list will contain items for each step in the call + # stack, starting with the outermost step in the `main` subworkflow, and + # ending with the most deeply nested step. + class Status + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a step of the workflow this execution is running. + # @!attribute [rw] routine + # @return [::String] + # Name of a routine within the workflow. + # @!attribute [rw] step + # @return [::String] + # Name of a step within the routine. + class Step + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes an error related to the current state of the Execution resource. + # @!attribute [rw] details + # @return [::String] + # Provides specifics about the error. + # @!attribute [rw] type + # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StateError::Type] + # The type of this state error. + class StateError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the possible types of a state error. + module Type + # No type specified. + TYPE_UNSPECIFIED = 0 + + # Caused by an issue with KMS. + KMS_ERROR = 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 + + # Describes the current state of the execution. More states might be added + # in the future. + module State + # Invalid state. + STATE_UNSPECIFIED = 0 + + # The execution is in progress. + ACTIVE = 1 + + # The execution finished successfully. + SUCCEEDED = 2 + + # The execution failed with an error. + FAILED = 3 + + # The execution was stopped intentionally. + CANCELLED = 4 + + # Execution data is unavailable. See the `state_error` field. + UNAVAILABLE = 5 + + # Request has been placed in the backlog for processing at a later time. + QUEUED = 6 + end + + # Describes the level of platform logging to apply to calls and call + # responses during workflow executions. + module CallLogLevel + # No call logging level specified. + CALL_LOG_LEVEL_UNSPECIFIED = 0 + + # Log all call steps within workflows, all call returns, and all exceptions + # raised. + LOG_ALL_CALLS = 1 + + # Log only exceptions that are raised from call steps within workflows. + LOG_ERRORS_ONLY = 2 + + # Explicitly log nothing. + LOG_NONE = 3 + end + end + + # Request for the + # [ListExecutions][] + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the workflow for which the executions should be listed. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of executions to return per call. + # Max supported value depends on the selected Execution view: it's 1000 for + # BASIC and 100 for FULL. The default value used if the field is not + # specified is 100, regardless of the selected view. Values greater than + # the max value will be coerced down to it. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListExecutions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListExecutions` must + # match the call that provided the page token. + # + # Note that pagination is applied to dynamic data. The list of executions + # returned can change between page requests. + # @!attribute [rw] view + # @return [::Google::Cloud::Workflows::Executions::V1::ExecutionView] + # Optional. A view defining which fields should be filled in the returned + # executions. The API will default to the BASIC view. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filters applied to the [Executions.ListExecutions] results. + # The following fields are supported for filtering: + # executionID, state, startTime, endTime, duration, workflowRevisionID, + # stepName, and label. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The ordering applied to the [Executions.ListExecutions] results. + # By default the ordering is based on descending start time. + # The following fields are supported for order by: + # executionID, startTime, endTime, duration, state, and workflowRevisionID. + class ListExecutionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the + # {::Google::Cloud::Workflows::Executions::V1::Executions::Client#list_executions ListExecutions} + # method. + # @!attribute [rw] executions + # @return [::Array<::Google::Cloud::Workflows::Executions::V1::Execution>] + # The executions which match the request. + # @!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 ListExecutionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::Executions::V1::Executions::Client#create_execution CreateExecution} + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the workflow for which an execution should be created. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # The latest revision of the workflow will be used. + # @!attribute [rw] execution + # @return [::Google::Cloud::Workflows::Executions::V1::Execution] + # Required. Execution to be created. + class CreateExecutionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::Executions::V1::Executions::Client#get_execution GetExecution} + # method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the execution to be retrieved. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # @!attribute [rw] view + # @return [::Google::Cloud::Workflows::Executions::V1::ExecutionView] + # Optional. A view defining which fields should be filled in the returned + # execution. The API will default to the FULL view. + class GetExecutionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::Executions::V1::Executions::Client#cancel_execution CancelExecution} + # method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the execution to be cancelled. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + class CancelExecutionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines possible views for execution resource. + module ExecutionView + # The default / unset value. + EXECUTION_VIEW_UNSPECIFIED = 0 + + # Includes only basic metadata about the execution. + # The following fields are returned: name, start_time, end_time, duration, + # state, and workflow_revision_id. + BASIC = 1 + + # Includes all data. + FULL = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/Gemfile new file mode 100644 index 000000000000..7daeaea34a37 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1", path: "../" +else + gem "google-cloud-workflows-executions-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-workflows-executions-v1/snippets/executions/cancel_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb new file mode 100644 index 000000000000..62751576d96a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflowexecutions_v1_generated_Executions_CancelExecution_sync] +require "google/cloud/workflows/executions/v1" + +## +# Snippet for the cancel_execution call in the Executions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::Executions::V1::Executions::Client#cancel_execution. +# +def cancel_execution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new + + # Call the cancel_execution method. + result = client.cancel_execution request + + # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. + p result +end +# [END workflowexecutions_v1_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb new file mode 100644 index 000000000000..e18a26220cc7 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflowexecutions_v1_generated_Executions_CreateExecution_sync] +require "google/cloud/workflows/executions/v1" + +## +# Snippet for the create_execution call in the Executions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::Executions::V1::Executions::Client#create_execution. +# +def create_execution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new + + # Call the create_execution method. + result = client.create_execution request + + # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. + p result +end +# [END workflowexecutions_v1_generated_Executions_CreateExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb new file mode 100644 index 000000000000..606f5d673467 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflowexecutions_v1_generated_Executions_GetExecution_sync] +require "google/cloud/workflows/executions/v1" + +## +# Snippet for the get_execution call in the Executions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::Executions::V1::Executions::Client#get_execution. +# +def get_execution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new + + # Call the get_execution method. + result = client.get_execution request + + # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. + p result +end +# [END workflowexecutions_v1_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb new file mode 100644 index 000000000000..71b5474a1300 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflowexecutions_v1_generated_Executions_ListExecutions_sync] +require "google/cloud/workflows/executions/v1" + +## +# Snippet for the list_executions call in the Executions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::Executions::V1::Executions::Client#list_executions. +# +def list_executions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new + + # Call the list_executions method. + result = client.list_executions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Workflows::Executions::V1::Execution. + p item + end +end +# [END workflowexecutions_v1_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/snippet_metadata_google.cloud.workflows.executions.v1.json b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/snippet_metadata_google.cloud.workflows.executions.v1.json new file mode 100644 index 000000000000..8484d092b98b --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/snippet_metadata_google.cloud.workflows.executions.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-cloud-workflows-executions-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.workflows.executions.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "workflowexecutions_v1_generated_Executions_ListExecutions_sync", + "title": "Snippet for the list_executions call in the Executions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1::Executions::Client#list_executions.", + "file": "executions/list_executions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_executions", + "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client#list_executions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse", + "client": { + "short_name": "Executions::Client", + "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client" + }, + "method": { + "short_name": "ListExecutions", + "full_name": "google.cloud.workflows.executions.v1.Executions.ListExecutions", + "service": { + "short_name": "Executions", + "full_name": "google.cloud.workflows.executions.v1.Executions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflowexecutions_v1_generated_Executions_CreateExecution_sync", + "title": "Snippet for the create_execution call in the Executions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1::Executions::Client#create_execution.", + "file": "executions/create_execution.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_execution", + "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client#create_execution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::Executions::V1::Execution", + "client": { + "short_name": "Executions::Client", + "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client" + }, + "method": { + "short_name": "CreateExecution", + "full_name": "google.cloud.workflows.executions.v1.Executions.CreateExecution", + "service": { + "short_name": "Executions", + "full_name": "google.cloud.workflows.executions.v1.Executions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflowexecutions_v1_generated_Executions_GetExecution_sync", + "title": "Snippet for the get_execution call in the Executions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1::Executions::Client#get_execution.", + "file": "executions/get_execution.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_execution", + "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client#get_execution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::Executions::V1::Execution", + "client": { + "short_name": "Executions::Client", + "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client" + }, + "method": { + "short_name": "GetExecution", + "full_name": "google.cloud.workflows.executions.v1.Executions.GetExecution", + "service": { + "short_name": "Executions", + "full_name": "google.cloud.workflows.executions.v1.Executions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflowexecutions_v1_generated_Executions_CancelExecution_sync", + "title": "Snippet for the cancel_execution call in the Executions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1::Executions::Client#cancel_execution.", + "file": "executions/cancel_execution.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_execution", + "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client#cancel_execution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::Executions::V1::Execution", + "client": { + "short_name": "Executions::Client", + "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client" + }, + "method": { + "short_name": "CancelExecution", + "full_name": "google.cloud.workflows.executions.v1.Executions.CancelExecution", + "service": { + "short_name": "Executions", + "full_name": "google.cloud.workflows.executions.v1.Executions" + } + } + }, + "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-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb new file mode 100644 index 000000000000..72a7af7dcf6e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_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/workflows/executions/v1/executions" + +class ::Google::Cloud::Workflows::Executions::V1::Executions::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_execution_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.execution_path project: "value0", location: "value1", workflow: "value2", execution: "value3" + assert_equal "projects/value0/locations/value1/workflows/value2/executions/value3", path + end + end + + def test_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::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.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-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb new file mode 100644 index 000000000000..999aa8c8b372 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb @@ -0,0 +1,322 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "gapic/rest" +require "google/cloud/workflows/executions/v1/executions_pb" +require "google/cloud/workflows/executions/v1/executions/rest" + + +class ::Google::Cloud::Workflows::Executions::V1::Executions::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_executions + # Create test objects. + client_result = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse.new + http_response = OpenStruct.new 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 = :EXECUTION_VIEW_UNSPECIFIED + filter = "hello world" + order_by = "hello world" + + list_executions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.stub :transcode_list_executions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_executions_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_executions parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_executions ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_executions(::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_executions_client_stub.call_count + end + end + end + + def test_create_execution + # Create test objects. + client_result = ::Google::Cloud::Workflows::Executions::V1::Execution.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + execution = {} + + create_execution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.stub :transcode_create_execution_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_execution_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_execution({ parent: parent, execution: execution }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_execution parent: parent, execution: execution do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_execution ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new(parent: parent, execution: execution) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_execution({ parent: parent, execution: execution }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_execution(::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new(parent: parent, execution: execution), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_execution_client_stub.call_count + end + end + end + + def test_get_execution + # Create test objects. + client_result = ::Google::Cloud::Workflows::Executions::V1::Execution.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + view = :EXECUTION_VIEW_UNSPECIFIED + + get_execution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.stub :transcode_get_execution_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_execution_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_execution({ name: name, view: view }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_execution name: name, view: view do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_execution ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new(name: name, view: view) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_execution({ name: name, view: view }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_execution(::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.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_execution_client_stub.call_count + end + end + end + + def test_cancel_execution + # Create test objects. + client_result = ::Google::Cloud::Workflows::Executions::V1::Execution.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_execution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.stub :transcode_cancel_execution_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_execution_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_execution({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_execution name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_execution ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_execution({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_execution(::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_execution_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::Workflows::Executions::V1::Executions::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::Workflows::Executions::V1::Executions::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb new file mode 100644 index 000000000000..ea4afdcca877 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb @@ -0,0 +1,355 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/workflows/executions/v1/executions_pb" +require "google/cloud/workflows/executions/v1/executions" + +class ::Google::Cloud::Workflows::Executions::V1::Executions::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_executions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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 = :EXECUTION_VIEW_UNSPECIFIED + filter = "hello world" + order_by = "hello world" + + list_executions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_executions, name + assert_kind_of ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :EXECUTION_VIEW_UNSPECIFIED, request["view"] + assert_equal "hello world", request["filter"] + assert_equal "hello world", request["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_executions_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_executions parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_executions ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_executions(::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_executions_client_stub.call_rpc_count + end + end + + def test_create_execution + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::Executions::V1::Execution.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + execution = {} + + create_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_execution, name + assert_kind_of ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::Executions::V1::Execution), request["execution"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_execution_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_execution({ parent: parent, execution: execution }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_execution parent: parent, execution: execution do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_execution ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new(parent: parent, execution: execution) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_execution({ parent: parent, execution: execution }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_execution(::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new(parent: parent, execution: execution), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_execution_client_stub.call_rpc_count + end + end + + def test_get_execution + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::Executions::V1::Execution.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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 = :EXECUTION_VIEW_UNSPECIFIED + + get_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_execution, name + assert_kind_of ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest, request + assert_equal "hello world", request["name"] + assert_equal :EXECUTION_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_execution_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_execution({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_execution name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_execution ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_execution({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_execution(::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.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_execution_client_stub.call_rpc_count + end + end + + def test_cancel_execution + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::Executions::V1::Execution.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_execution, name + assert_kind_of ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_execution_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_execution({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_execution name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_execution ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_execution({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_execution(::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new(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_execution_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::Workflows::Executions::V1::Executions::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::Workflows::Executions::V1::Executions::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::Workflows::Executions::V1::Executions::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Workflows::Executions::V1::Executions::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..e81c837b52ed --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "workflowexecutions.googleapis.com", + "api_shortname": "workflowexecutions", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1beta/latest", + "distribution_name": "google-cloud-workflows-executions-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "workflowexecutions", + "name_pretty": "Workflows Executions V1beta API", + "product_documentation": "https://cloud.google.com/workflows/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-executions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details.", + "ruby-cloud-env-prefix": "WORKFLOWS", + "ruby-cloud-product-url": "https://cloud.google.com/workflows/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.rubocop.yml new file mode 100644 index 000000000000..307c124f8568 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workflows-executions-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-workflows-executions-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.toys.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/.yardopts b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.yardopts new file mode 100644 index 000000000000..59f0a9e09511 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Workflows Executions 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-workflows-executions-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows-executions-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..4d061343a486 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workflows-executions-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-workflows-executions-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/workflows/executions/v1beta" + +client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workflows/executions/v1beta" + +::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::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-workflows-executions-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/workflows/executions/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::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-workflows-executions-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows-executions-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile b/owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-workflows-executions-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/README.md b/owl-bot-staging/google-cloud-workflows-executions-v1beta/README.md new file mode 100644 index 000000000000..006a8fe26b14 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Workflows Executions V1beta API + +Manages user-provided workflows. + +Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Workflows Executions V1beta API. Most users should consider using +the main client gem, +[google-cloud-workflows](https://rubygems.org/gems/google-cloud-workflows). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-workflows-executions-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/workflowexecutions.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/workflows/executions/v1beta" + +client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new +request = ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new # (request fields as keyword arguments...) +response = client.list_executions request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/workflows/) +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/workflows/executions/v1beta" +require "logger" + +client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workflows`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workflows-executions-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-workflows`. +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-workflows-executions-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-workflows-executions-v1beta/Rakefile b/owl-bot-staging/google-cloud-workflows-executions-v1beta/Rakefile new file mode 100644 index 000000000000..fa9f3f6dac59 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WORKFLOWS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WORKFLOWS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/workflows/executions/v1beta/executions/credentials" + ::Google::Cloud::Workflows::Executions::V1beta::Executions::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WORKFLOWS_PROJECT"] = project + ENV["WORKFLOWS_TEST_PROJECT"] = project + ENV["WORKFLOWS_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-workflows-executions-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-workflows-executions-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-workflows-executions-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-workflows-executions-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workflows-executions-v1beta" + header "google-cloud-workflows-executions-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workflows-executions-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workflows-executions-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-workflows-executions-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-workflows-executions-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-workflows-executions-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-workflows-executions-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..48333bd150d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/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.workflows.executions.v1beta", + "libraryPackage": "::Google::Cloud::Workflows::Executions::V1beta", + "services": { + "Executions": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client", + "rpcs": { + "ListExecutions": { + "methods": [ + "list_executions" + ] + }, + "CreateExecution": { + "methods": [ + "create_execution" + ] + }, + "GetExecution": { + "methods": [ + "get_execution" + ] + }, + "CancelExecution": { + "methods": [ + "cancel_execution" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/google-cloud-workflows-executions-v1beta.gemspec b/owl-bot-staging/google-cloud-workflows-executions-v1beta/google-cloud-workflows-executions-v1beta.gemspec new file mode 100644 index 000000000000..24f03edc36f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/google-cloud-workflows-executions-v1beta.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workflows/executions/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workflows-executions-v1beta" + gem.version = Google::Cloud::Workflows::Executions::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-executions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details." + gem.summary = "Manages user-provided workflows." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb new file mode 100644 index 000000000000..2e0636bb1b59 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-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/workflows/executions/v1beta" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb new file mode 100644 index 000000000000..f86ef8bc398c --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.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/workflows/executions/v1beta/executions" +require "google/cloud/workflows/executions/v1beta/version" + +module Google + module Cloud + module Workflows + module Executions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/workflows/executions/v1beta" + # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + # + module V1beta + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/workflows/executions/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb new file mode 100644 index 000000000000..10f6adbe5ec1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/workflows/executions/v1beta/version" + +require "google/cloud/workflows/executions/v1beta/executions/credentials" +require "google/cloud/workflows/executions/v1beta/executions/paths" +require "google/cloud/workflows/executions/v1beta/executions/client" + +module Google + module Cloud + module Workflows + module Executions + module V1beta + ## + # Executions is used to start and manage running instances of + # [Workflows][google.cloud.workflows.v1beta.Workflow] called executions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/workflows/executions/v1beta/executions" + # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + # + module Executions + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "executions", "helpers.rb" +require "google/cloud/workflows/executions/v1beta/executions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb new file mode 100644 index 000000000000..2bfac81e7856 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb @@ -0,0 +1,789 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/workflows/executions/v1beta/executions_pb" + +module Google + module Cloud + module Workflows + module Executions + module V1beta + module Executions + ## + # Client for the Executions service. + # + # Executions is used to start and manage running instances of + # [Workflows][google.cloud.workflows.v1beta.Workflow] called executions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflowexecutions.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :executions_stub + + ## + # Configure the Executions Client class. + # + # See {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Executions clients + # ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workflows", "Executions", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Executions Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @executions_stub.universe_domain + end + + ## + # Create a new Executions client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Executions 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/workflows/executions/v1beta/executions_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 + + @executions_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Workflows::Executions::V1beta::Executions::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 + ) + + @executions_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 + @executions_stub.logger + end + + # Service calls + + ## + # Returns a list of executions which belong to the workflow with + # the given name. The method returns executions of all workflow + # revisions. Returned executions are ordered by their start time (newest + # first). + # + # @overload list_executions(request, options = nil) + # Pass arguments to `list_executions` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_executions(parent: nil, page_size: nil, page_token: nil, view: nil) + # Pass arguments to `list_executions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the workflow for which the executions should be listed. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @param page_size [::Integer] + # Maximum number of executions to return per call. + # Max supported value depends on the selected Execution view: it's 10000 for + # BASIC and 100 for FULL. The default value used if the field is not + # specified is 100, regardless of the selected view. Values greater than + # the max value will be coerced down to it. + # @param page_token [::String] + # A page token, received from a previous `ListExecutions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListExecutions` must + # match the call that provided the page token. + # @param view [::Google::Cloud::Workflows::Executions::V1beta::ExecutionView] + # Optional. A view defining which fields should be filled in the returned executions. + # The API will default to the BASIC view. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1beta::Execution>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1beta::Execution>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new + # + # # Call the list_executions method. + # result = client.list_executions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workflows::Executions::V1beta::Execution. + # p item + # end + # + def list_executions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_executions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::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_executions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_executions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.call_rpc :list_executions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @executions_stub, :list_executions, request, response, 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 execution using the latest revision of the given workflow. + # + # @overload create_execution(request, options = nil) + # Pass arguments to `create_execution` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_execution(parent: nil, execution: nil) + # Pass arguments to `create_execution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. Name of the workflow for which an execution should be created. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # The latest revision of the workflow will be used. + # @param execution [::Google::Cloud::Workflows::Executions::V1beta::Execution, ::Hash] + # Required. Execution to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workflows::Executions::V1beta::Execution] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest.new + # + # # Call the create_execution method. + # result = client.create_execution request + # + # # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. + # p result + # + def create_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_execution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::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_execution.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.call_rpc :create_execution, request, 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 an execution of the given name. + # + # @overload get_execution(request, options = nil) + # Pass arguments to `get_execution` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_execution(name: nil, view: nil) + # Pass arguments to `get_execution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the execution to be retrieved. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # @param view [::Google::Cloud::Workflows::Executions::V1beta::ExecutionView] + # Optional. A view defining which fields should be filled in the returned execution. + # The API will default to the FULL view. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workflows::Executions::V1beta::Execution] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest.new + # + # # Call the get_execution method. + # result = client.get_execution request + # + # # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. + # p result + # + def get_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_execution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::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_execution.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.call_rpc :get_execution, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Cancels an execution of the given name. + # + # @overload cancel_execution(request, options = nil) + # Pass arguments to `cancel_execution` via a request object, either of type + # {::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_execution(name: nil) + # Pass arguments to `cancel_execution` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the execution to be cancelled. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workflows::Executions::V1beta::Execution] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/executions/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest.new + # + # # Call the cancel_execution method. + # result = client.cancel_execution request + # + # # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. + # p result + # + def cancel_execution request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest + + # Converts hash and nil to 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_execution.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workflows::Executions::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_execution.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_execution.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @executions_stub.call_rpc :cancel_execution, request, 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 Executions API. + # + # This class represents the configuration for Executions, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_executions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_executions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_executions.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Workflows::Executions::V1beta::Executions::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflowexecutions.googleapis.com" + + config_attr :endpoint, nil, ::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 Executions API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_executions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_executions + ## + # RPC-specific configuration for `create_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :create_execution + ## + # RPC-specific configuration for `get_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :get_execution + ## + # RPC-specific configuration for `cancel_execution` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_execution + + # @private + def initialize parent_rpcs = nil + list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions + @list_executions = ::Gapic::Config::Method.new list_executions_config + create_execution_config = parent_rpcs.create_execution if parent_rpcs.respond_to? :create_execution + @create_execution = ::Gapic::Config::Method.new create_execution_config + get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution + @get_execution = ::Gapic::Config::Method.new get_execution_config + cancel_execution_config = parent_rpcs.cancel_execution if parent_rpcs.respond_to? :cancel_execution + @cancel_execution = ::Gapic::Config::Method.new cancel_execution_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb new file mode 100644 index 000000000000..82a81fac37cc --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/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 Workflows + module Executions + module V1beta + module Executions + # Credentials for the Executions API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "WORKFLOWS_CREDENTIALS", + "WORKFLOWS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "WORKFLOWS_CREDENTIALS_JSON", + "WORKFLOWS_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-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb new file mode 100644 index 000000000000..91d5836ff754 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb @@ -0,0 +1,75 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Workflows + module Executions + module V1beta + module Executions + # Path helper methods for the Executions API. + module Paths + ## + # Create a fully-qualified Execution resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}` + # + # @param project [String] + # @param location [String] + # @param workflow [String] + # @param execution [String] + # + # @return [::String] + def execution_path project:, location:, workflow:, execution: + 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}/executions/#{execution}" + end + + ## + # Create a fully-qualified Workflow 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 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-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb new file mode 100644 index 000000000000..1367aaf81255 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/workflows/executions/v1beta/executions.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n9google/cloud/workflows/executions/v1beta/executions.proto\x12(google.cloud.workflows.executions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf8\x04\n\tExecution\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x05state\x18\x04 \x01(\x0e\x32\x39.google.cloud.workflows.executions.v1beta.Execution.StateB\x03\xe0\x41\x03\x12\x10\n\x08\x61rgument\x18\x05 \x01(\t\x12\x13\n\x06result\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12M\n\x05\x65rror\x18\x07 \x01(\x0b\x32\x39.google.cloud.workflows.executions.v1beta.Execution.ErrorB\x03\xe0\x41\x03\x12!\n\x14workflow_revision_id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a)\n\x05\x45rror\x12\x0f\n\x07payload\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontext\x18\x02 \x01(\t\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04:\x86\x01\xea\x41\x82\x01\n+workflowexecutions.googleapis.com/Execution\x12Sprojects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}\"\xc5\x01\n\x15ListExecutionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12J\n\x04view\x18\x04 \x01(\x0e\x32\x37.google.cloud.workflows.executions.v1beta.ExecutionViewB\x03\xe0\x41\x01\"z\n\x16ListExecutionsResponse\x12G\n\nexecutions\x18\x01 \x03(\x0b\x32\x33.google.cloud.workflows.executions.v1beta.Execution\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x16\x43reateExecutionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\x12K\n\texecution\x18\x02 \x01(\x0b\x32\x33.google.cloud.workflows.executions.v1beta.ExecutionB\x03\xe0\x41\x02\"\xa4\x01\n\x13GetExecutionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workflowexecutions.googleapis.com/Execution\x12J\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.workflows.executions.v1beta.ExecutionViewB\x03\xe0\x41\x01\"[\n\x16\x43\x61ncelExecutionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workflowexecutions.googleapis.com/Execution*D\n\rExecutionView\x12\x1e\n\x1a\x45XECUTION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xf3\x07\n\nExecutions\x12\xe4\x01\n\x0eListExecutions\x12?.google.cloud.workflows.executions.v1beta.ListExecutionsRequest\x1a@.google.cloud.workflows.executions.v1beta.ListExecutionsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1beta/{parent=projects/*/locations/*/workflows/*}/executions\x12\xee\x01\n\x0f\x43reateExecution\x12@.google.cloud.workflows.executions.v1beta.CreateExecutionRequest\x1a\x33.google.cloud.workflows.executions.v1beta.Execution\"d\xda\x41\x10parent,execution\x82\xd3\xe4\x93\x02K\">/v1beta/{parent=projects/*/locations/*/workflows/*}/executions:\texecution\x12\xd1\x01\n\x0cGetExecution\x12=.google.cloud.workflows.executions.v1beta.GetExecutionRequest\x1a\x33.google.cloud.workflows.executions.v1beta.Execution\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}\x12\xe1\x01\n\x0f\x43\x61ncelExecution\x12@.google.cloud.workflows.executions.v1beta.CancelExecutionRequest\x1a\x33.google.cloud.workflows.executions.v1beta.Execution\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\"E/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}:cancel:\x01*\x1aU\xca\x41!workflowexecutions.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf3\x01\n,com.google.cloud.workflows.executions.v1betaB\x0f\x45xecutionsProtoP\x01ZLcloud.google.com/go/workflows/executions/apiv1beta/executionspb;executionspb\xea\x41\x61\n!workflows.googleapis.com/Workflow\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. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb new file mode 100644 index 000000000000..155d545071b2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb @@ -0,0 +1,200 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Workflows + module Executions + module V1beta + # A running instance of a [Workflow][google.cloud.workflows.v1beta.Workflow]. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the execution. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Marks the beginning of execution. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Marks the end of execution, successful or not. + # @!attribute [r] state + # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution::State] + # Output only. Current state of the execution. + # @!attribute [rw] argument + # @return [::String] + # Input parameters of the execution represented as a JSON string. + # The size limit is 32KB. + # @!attribute [r] result + # @return [::String] + # Output only. Output of the execution represented as a JSON string. The + # value can only be present if the execution's state is `SUCCEEDED`. + # @!attribute [r] error + # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution::Error] + # Output only. The error which caused the execution to finish prematurely. + # The value is only present if the execution's state is `FAILED` + # or `CANCELLED`. + # @!attribute [r] workflow_revision_id + # @return [::String] + # Output only. Revision of the workflow this execution is using. + class Execution + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Error describes why the execution was abnormally terminated. + # @!attribute [rw] payload + # @return [::String] + # Error payload returned by the execution, represented as a JSON string. + # @!attribute [rw] context + # @return [::String] + # Human readable error context, helpful for debugging purposes. + class Error + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the current state of the execution. More states may be added + # in the future. + module State + # Invalid state. + STATE_UNSPECIFIED = 0 + + # The execution is in progress. + ACTIVE = 1 + + # The execution finished successfully. + SUCCEEDED = 2 + + # The execution failed with an error. + FAILED = 3 + + # The execution was stopped intentionally. + CANCELLED = 4 + end + end + + # Request for the + # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions ListExecutions} + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the workflow for which the executions should be listed. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of executions to return per call. + # Max supported value depends on the selected Execution view: it's 10000 for + # BASIC and 100 for FULL. The default value used if the field is not + # specified is 100, regardless of the selected view. Values greater than + # the max value will be coerced down to it. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListExecutions` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListExecutions` must + # match the call that provided the page token. + # @!attribute [rw] view + # @return [::Google::Cloud::Workflows::Executions::V1beta::ExecutionView] + # Optional. A view defining which fields should be filled in the returned executions. + # The API will default to the BASIC view. + class ListExecutionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the + # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions ListExecutions} + # method. + # @!attribute [rw] executions + # @return [::Array<::Google::Cloud::Workflows::Executions::V1beta::Execution>] + # The executions which match the request. + # @!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 ListExecutionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#create_execution CreateExecution} + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. Name of the workflow for which an execution should be created. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # The latest revision of the workflow will be used. + # @!attribute [rw] execution + # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution] + # Required. Execution to be created. + class CreateExecutionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#get_execution GetExecution} + # method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the execution to be retrieved. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + # @!attribute [rw] view + # @return [::Google::Cloud::Workflows::Executions::V1beta::ExecutionView] + # Optional. A view defining which fields should be filled in the returned execution. + # The API will default to the FULL view. + class GetExecutionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#cancel_execution CancelExecution} + # method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the execution to be cancelled. + # Format: + # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} + class CancelExecutionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines possible views for execution resource. + module ExecutionView + # The default / unset value. + EXECUTION_VIEW_UNSPECIFIED = 0 + + # Includes only basic metadata about the execution. + # Following fields are returned: name, start_time, end_time, state + # and workflow_revision_id. + BASIC = 1 + + # Includes all data. + FULL = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..16f945ec033e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta", path: "../" +else + gem "google-cloud-workflows-executions-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-workflows-executions-v1beta/snippets/executions/cancel_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb new file mode 100644 index 000000000000..8f7f3934284c --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflowexecutions_v1beta_generated_Executions_CancelExecution_sync] +require "google/cloud/workflows/executions/v1beta" + +## +# Snippet for the cancel_execution call in the Executions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::Executions::V1beta::Executions::Client#cancel_execution. +# +def cancel_execution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest.new + + # Call the cancel_execution method. + result = client.cancel_execution request + + # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. + p result +end +# [END workflowexecutions_v1beta_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb new file mode 100644 index 000000000000..926c4489f51d --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflowexecutions_v1beta_generated_Executions_CreateExecution_sync] +require "google/cloud/workflows/executions/v1beta" + +## +# Snippet for the create_execution call in the Executions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::Executions::V1beta::Executions::Client#create_execution. +# +def create_execution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest.new + + # Call the create_execution method. + result = client.create_execution request + + # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. + p result +end +# [END workflowexecutions_v1beta_generated_Executions_CreateExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb new file mode 100644 index 000000000000..58e0a552a8ab --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflowexecutions_v1beta_generated_Executions_GetExecution_sync] +require "google/cloud/workflows/executions/v1beta" + +## +# Snippet for the get_execution call in the Executions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::Executions::V1beta::Executions::Client#get_execution. +# +def get_execution + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest.new + + # Call the get_execution method. + result = client.get_execution request + + # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. + p result +end +# [END workflowexecutions_v1beta_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb new file mode 100644 index 000000000000..a8f00e5f1390 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflowexecutions_v1beta_generated_Executions_ListExecutions_sync] +require "google/cloud/workflows/executions/v1beta" + +## +# Snippet for the list_executions call in the Executions service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions. +# +def list_executions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new + + # Call the list_executions method. + result = client.list_executions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Workflows::Executions::V1beta::Execution. + p item + end +end +# [END workflowexecutions_v1beta_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/snippet_metadata_google.cloud.workflows.executions.v1beta.json b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/snippet_metadata_google.cloud.workflows.executions.v1beta.json new file mode 100644 index 000000000000..598ce53245c5 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/snippet_metadata_google.cloud.workflows.executions.v1beta.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-cloud-workflows-executions-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.workflows.executions.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "workflowexecutions_v1beta_generated_Executions_ListExecutions_sync", + "title": "Snippet for the list_executions call in the Executions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions.", + "file": "executions/list_executions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_executions", + "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsResponse", + "client": { + "short_name": "Executions::Client", + "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client" + }, + "method": { + "short_name": "ListExecutions", + "full_name": "google.cloud.workflows.executions.v1beta.Executions.ListExecutions", + "service": { + "short_name": "Executions", + "full_name": "google.cloud.workflows.executions.v1beta.Executions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflowexecutions_v1beta_generated_Executions_CreateExecution_sync", + "title": "Snippet for the create_execution call in the Executions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1beta::Executions::Client#create_execution.", + "file": "executions/create_execution.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_execution", + "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#create_execution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::Executions::V1beta::Execution", + "client": { + "short_name": "Executions::Client", + "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client" + }, + "method": { + "short_name": "CreateExecution", + "full_name": "google.cloud.workflows.executions.v1beta.Executions.CreateExecution", + "service": { + "short_name": "Executions", + "full_name": "google.cloud.workflows.executions.v1beta.Executions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflowexecutions_v1beta_generated_Executions_GetExecution_sync", + "title": "Snippet for the get_execution call in the Executions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1beta::Executions::Client#get_execution.", + "file": "executions/get_execution.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_execution", + "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#get_execution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::Executions::V1beta::Execution", + "client": { + "short_name": "Executions::Client", + "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client" + }, + "method": { + "short_name": "GetExecution", + "full_name": "google.cloud.workflows.executions.v1beta.Executions.GetExecution", + "service": { + "short_name": "Executions", + "full_name": "google.cloud.workflows.executions.v1beta.Executions" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflowexecutions_v1beta_generated_Executions_CancelExecution_sync", + "title": "Snippet for the cancel_execution call in the Executions service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1beta::Executions::Client#cancel_execution.", + "file": "executions/cancel_execution.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_execution", + "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#cancel_execution", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::Executions::V1beta::Execution", + "client": { + "short_name": "Executions::Client", + "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client" + }, + "method": { + "short_name": "CancelExecution", + "full_name": "google.cloud.workflows.executions.v1beta.Executions.CancelExecution", + "service": { + "short_name": "Executions", + "full_name": "google.cloud.workflows.executions.v1beta.Executions" + } + } + }, + "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-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb new file mode 100644 index 000000000000..d23ec98d8085 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_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/workflows/executions/v1beta/executions" + +class ::Google::Cloud::Workflows::Executions::V1beta::Executions::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_execution_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.execution_path project: "value0", location: "value1", workflow: "value2", execution: "value3" + assert_equal "projects/value0/locations/value1/workflows/value2/executions/value3", path + end + end + + def test_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::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.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-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb new file mode 100644 index 000000000000..c293feaf68bc --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb @@ -0,0 +1,351 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/workflows/executions/v1beta/executions_pb" +require "google/cloud/workflows/executions/v1beta/executions" + +class ::Google::Cloud::Workflows::Executions::V1beta::Executions::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_executions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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 = :EXECUTION_VIEW_UNSPECIFIED + + list_executions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_executions, name + assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal :EXECUTION_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_executions_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_executions parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_executions ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_executions(::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_executions_client_stub.call_rpc_count + end + end + + def test_create_execution + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::Executions::V1beta::Execution.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + execution = {} + + create_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_execution, name + assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::Executions::V1beta::Execution), request["execution"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_execution_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_execution({ parent: parent, execution: execution }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_execution parent: parent, execution: execution do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_execution ::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest.new(parent: parent, execution: execution) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_execution({ parent: parent, execution: execution }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_execution(::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest.new(parent: parent, execution: execution), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_execution_client_stub.call_rpc_count + end + end + + def test_get_execution + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::Executions::V1beta::Execution.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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 = :EXECUTION_VIEW_UNSPECIFIED + + get_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_execution, name + assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest, request + assert_equal "hello world", request["name"] + assert_equal :EXECUTION_VIEW_UNSPECIFIED, request["view"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_execution_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_execution({ name: name, view: view }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_execution name: name, view: view do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_execution ::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest.new(name: name, view: view) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_execution({ name: name, view: view }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_execution(::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest.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_execution_client_stub.call_rpc_count + end + end + + def test_cancel_execution + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::Executions::V1beta::Execution.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_execution, name + assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_execution_client_stub do + # Create client + client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_execution({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_execution name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_execution ::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_execution({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_execution(::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest.new(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_execution_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::Workflows::Executions::V1beta::Executions::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::Workflows::Executions::V1beta::Executions::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::Workflows::Executions::V1beta::Executions::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows-v1/.repo-metadata.json new file mode 100644 index 000000000000..69f7509959da --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "workflows.googleapis.com", + "api_shortname": "workflows", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest", + "distribution_name": "google-cloud-workflows-v1", + "is_cloud": true, + "language": "ruby", + "name": "workflows", + "name_pretty": "Workflows V1 API", + "product_documentation": "https://cloud.google.com/workflows/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details.", + "ruby-cloud-env-prefix": "WORKFLOWS", + "ruby-cloud-product-url": "https://cloud.google.com/workflows/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workflows-v1/.rubocop.yml b/owl-bot-staging/google-cloud-workflows-v1/.rubocop.yml new file mode 100644 index 000000000000..f3347d525c00 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workflows-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-workflows-v1.rb" diff --git a/owl-bot-staging/google-cloud-workflows-v1/.toys.rb b/owl-bot-staging/google-cloud-workflows-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/.yardopts b/owl-bot-staging/google-cloud-workflows-v1/.yardopts new file mode 100644 index 000000000000..3d801a2a7c84 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Workflows 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-workflows-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..e217594f764c --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workflows-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-workflows-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/workflows/v1" + +client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workflows/v1" + +::Google::Cloud::Workflows::V1::Workflows::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Workflows::V1::Workflows::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-workflows-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/workflows/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Workflows::V1::Workflows::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-workflows-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workflows-v1/Gemfile b/owl-bot-staging/google-cloud-workflows-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows-v1/LICENSE.md b/owl-bot-staging/google-cloud-workflows-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/README.md b/owl-bot-staging/google-cloud-workflows-v1/README.md new file mode 100644 index 000000000000..d7ab36838d46 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Workflows V1 API + +Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API. + +Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Workflows V1 API. Most users should consider using +the main client gem, +[google-cloud-workflows](https://rubygems.org/gems/google-cloud-workflows). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-workflows-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/workflows.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/workflows/v1" + +client = ::Google::Cloud::Workflows::V1::Workflows::Client.new +request = ::Google::Cloud::Workflows::V1::ListWorkflowsRequest.new # (request fields as keyword arguments...) +response = client.list_workflows request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/workflows/) +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/workflows/v1" +require "logger" + +client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workflows`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workflows-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-workflows`. +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-workflows-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-workflows-v1/Rakefile b/owl-bot-staging/google-cloud-workflows-v1/Rakefile new file mode 100644 index 000000000000..13816b0b43f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WORKFLOWS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WORKFLOWS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/workflows/v1/workflows/credentials" + ::Google::Cloud::Workflows::V1::Workflows::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WORKFLOWS_PROJECT"] = project + ENV["WORKFLOWS_TEST_PROJECT"] = project + ENV["WORKFLOWS_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-workflows-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-workflows-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-workflows-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-workflows-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workflows-v1" + header "google-cloud-workflows-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workflows-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workflows-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-workflows-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-workflows-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-workflows-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-workflows-v1/gapic_metadata.json new file mode 100644 index 000000000000..ec6940cb8f05 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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.workflows.v1", + "libraryPackage": "::Google::Cloud::Workflows::V1", + "services": { + "Workflows": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Workflows::V1::Workflows::Client", + "rpcs": { + "ListWorkflows": { + "methods": [ + "list_workflows" + ] + }, + "GetWorkflow": { + "methods": [ + "get_workflow" + ] + }, + "CreateWorkflow": { + "methods": [ + "create_workflow" + ] + }, + "DeleteWorkflow": { + "methods": [ + "delete_workflow" + ] + }, + "UpdateWorkflow": { + "methods": [ + "update_workflow" + ] + }, + "ListWorkflowRevisions": { + "methods": [ + "list_workflow_revisions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-workflows-v1/google-cloud-workflows-v1.gemspec b/owl-bot-staging/google-cloud-workflows-v1/google-cloud-workflows-v1.gemspec new file mode 100644 index 000000000000..52db5a4f6e82 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/google-cloud-workflows-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workflows/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workflows-v1" + gem.version = Google::Cloud::Workflows::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details." + gem.summary = "Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb new file mode 100644 index 000000000000..1b638a3e422e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google-cloud-workflows-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/workflows/v1" diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb new file mode 100644 index 000000000000..bda78f5b4bc6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/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/workflows/v1/workflows" +require "google/cloud/workflows/v1/version" + +module Google + module Cloud + module Workflows + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/workflows/v1" + # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/workflows/v1" + # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/workflows/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb new file mode 100644 index 000000000000..793a02bd64cd --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/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 Workflows + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/workflows/v1/rest" + # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workflows"] + parent_config = while namespace.any? + parent_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-workflows-v1/lib/google/cloud/workflows/v1/rest.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb new file mode 100644 index 000000000000..16f410759b32 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/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/workflows/v1/workflows/rest" +require "google/cloud/workflows/v1/bindings_override" +require "google/cloud/workflows/v1/version" + +module Google + module Cloud + module Workflows + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/workflows/v1/rest" + # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/version.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/version.rb new file mode 100644 index 000000000000..ad8aed01cf91 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/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 Workflows + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb new file mode 100644 index 000000000000..f4818691ad45 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.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/workflows/v1/version" + +require "google/cloud/workflows/v1/workflows/credentials" +require "google/cloud/workflows/v1/workflows/paths" +require "google/cloud/workflows/v1/workflows/operations" +require "google/cloud/workflows/v1/workflows/client" +require "google/cloud/workflows/v1/workflows/rest" + +module Google + module Cloud + module Workflows + module V1 + ## + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/workflows/v1/workflows" + # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/workflows/v1/workflows/rest" + # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + module Workflows + end + end + end + end +end + +helper_path = ::File.join __dir__, "workflows", "helpers.rb" +require "google/cloud/workflows/v1/workflows/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb new file mode 100644 index 000000000000..55f6b6df1255 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb @@ -0,0 +1,1074 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/workflows/v1/workflows_pb" +require "google/cloud/location" + +module Google + module Cloud + module Workflows + module V1 + module Workflows + ## + # Client for the Workflows service. + # + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workflows_stub + + ## + # Configure the Workflows Client class. + # + # See {::Google::Cloud::Workflows::V1::Workflows::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Workflows clients + # ::Google::Cloud::Workflows::V1::Workflows::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workflows", "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 Workflows Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workflows::V1::Workflows::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @workflows_stub.universe_domain + end + + ## + # Create a new Workflows client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Workflows 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/workflows/v1/workflows_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 + + @workflows_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Workflows::V1::Workflows::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 + ) + + @workflows_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 = @workflows_stub.endpoint + config.universe_domain = @workflows_stub.universe_domain + config.logger = @workflows_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Workflows::V1::Workflows::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 + @workflows_stub.logger + end + + # Service calls + + ## + # Lists workflows in a given project and location. + # The default order is not specified. + # + # @overload list_workflows(request, options = nil) + # Pass arguments to `list_workflows` via a request object, either of type + # {::Google::Cloud::Workflows::V1::ListWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::ListWorkflowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_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. Project and location from which the workflows should be listed. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Maximum number of workflows to return per call. The service might return + # fewer than this value even if not at the end of the collection. If a value + # is not specified, a default value of 500 is used. The maximum permitted + # value is 1000 and values greater than 1000 are coerced down to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListWorkflows` must + # match the call that provided the page token. + # @param filter [::String] + # Filter to restrict results to specific workflows. + # For details, see AIP-160. + # + # For example, if you are using the Google APIs Explorer: + # + # `state="SUCCEEDED"` + # + # or + # + # `createTime>"2023-08-01" AND state="FAILED"` + # @param order_by [::String] + # Comma-separated list of fields that specify the order of the results. + # Default sorting order for a field is ascending. To specify descending order + # for a field, append a "desc" suffix. + # If not specified, the results are returned in an unspecified order. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::ListWorkflowsRequest.new + # + # # Call the list_workflows method. + # result = client.list_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::Workflows::V1::Workflow. + # p item + # end + # + def list_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::ListWorkflowsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workflows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :list_workflows, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workflows_stub, :list_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 + + ## + # Gets details of a single workflow. + # + # @overload get_workflow(request, options = nil) + # Pass arguments to `get_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1::GetWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::GetWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workflow(name: nil, revision_id: nil) + # Pass arguments to `get_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. Name of the workflow for which information should be retrieved. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @param revision_id [::String] + # Optional. The revision of the workflow to retrieve. If the revision_id is + # empty, the latest revision is retrieved. + # The format is "000001-a4d", where the first six characters define + # the zero-padded decimal revision number. They are followed by a hyphen and + # three hexadecimal characters. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workflows::V1::Workflow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workflows::V1::Workflow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::GetWorkflowRequest.new + # + # # Call the get_workflow method. + # result = client.get_workflow request + # + # # The returned object is of type Google::Cloud::Workflows::V1::Workflow. + # p result + # + def get_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::GetWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :get_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 + + ## + # Creates a new workflow. If a workflow with the specified name already + # exists in the specified project and location, the long running operation + # returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + # + # @overload create_workflow(request, options = nil) + # Pass arguments to `create_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1::CreateWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::CreateWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workflow(parent: nil, workflow: nil, workflow_id: nil) + # Pass arguments to `create_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. Project and location in which the workflow should be created. + # Format: projects/\\{project}/locations/\\{location} + # @param workflow [::Google::Cloud::Workflows::V1::Workflow, ::Hash] + # Required. Workflow to be created. + # @param workflow_id [::String] + # Required. The ID of the workflow to be created. It has to fulfill the + # following requirements: + # + # * Must contain only letters, numbers, underscores and hyphens. + # * Must start with a letter. + # * Must be between 1-64 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project and 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/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::CreateWorkflowRequest.new + # + # # Call the create_workflow method. + # result = client.create_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::CreateWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :create_workflow, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 workflow with the specified name. + # This method also cancels and deletes all running executions of the + # workflow. + # + # @overload delete_workflow(request, options = nil) + # Pass arguments to `delete_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1::DeleteWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::DeleteWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workflow(name: nil) + # Pass arguments to `delete_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. Name of the workflow to be deleted. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new + # + # # Call the delete_workflow method. + # result = client.delete_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :delete_workflow, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 workflow. + # Running this method has no impact on already running executions of the + # workflow. A new revision of the workflow might be created as a result of a + # successful update operation. In that case, the new revision is used + # in new workflow executions. + # + # @overload update_workflow(request, options = nil) + # Pass arguments to `update_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1::UpdateWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::UpdateWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workflow(workflow: nil, update_mask: nil) + # Pass arguments to `update_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 workflow [::Google::Cloud::Workflows::V1::Workflow, ::Hash] + # Required. Workflow to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields to be updated. If not present, the entire workflow + # will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new + # + # # Call the update_workflow method. + # result = client.update_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.workflow&.name + header_params["workflow.name"] = request.workflow.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :update_workflow, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 revisions for a given workflow. + # + # @overload list_workflow_revisions(request, options = nil) + # Pass arguments to `list_workflow_revisions` via a request object, either of type + # {::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workflow_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workflow_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Workflow for which the revisions should be listed. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @param page_size [::Integer] + # The maximum number of revisions to return per page. If a value is not + # specified, a default value of 20 is used. The maximum permitted value is + # 100. Values greater than 100 are coerced down to 100. + # @param page_token [::String] + # The page token, received from a previous ListWorkflowRevisions call. + # Provide this to retrieve the subsequent page. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new + # + # # Call the list_workflow_revisions method. + # result = client.list_workflow_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::Workflows::V1::Workflow. + # p item + # end + # + def list_workflow_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workflow_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workflow_revisions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workflow_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :list_workflow_revisions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workflows_stub, :list_workflow_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 + + ## + # Configuration class for the Workflows API. + # + # This class represents the configuration for Workflows, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Workflows::V1::Workflows::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_workflows to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workflows::V1::Workflows::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_workflows.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_workflows.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Workflows::V1::Workflows::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflows.googleapis.com" + + config_attr :endpoint, nil, ::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 Workflows API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workflows + ## + # RPC-specific configuration for `get_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workflow + ## + # RPC-specific configuration for `create_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workflow + ## + # RPC-specific configuration for `delete_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workflow + ## + # RPC-specific configuration for `update_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workflow + ## + # RPC-specific configuration for `list_workflow_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workflow_revisions + + # @private + def initialize parent_rpcs = nil + list_workflows_config = parent_rpcs.list_workflows if parent_rpcs.respond_to? :list_workflows + @list_workflows = ::Gapic::Config::Method.new list_workflows_config + get_workflow_config = parent_rpcs.get_workflow if parent_rpcs.respond_to? :get_workflow + @get_workflow = ::Gapic::Config::Method.new get_workflow_config + create_workflow_config = parent_rpcs.create_workflow if parent_rpcs.respond_to? :create_workflow + @create_workflow = ::Gapic::Config::Method.new create_workflow_config + delete_workflow_config = parent_rpcs.delete_workflow if parent_rpcs.respond_to? :delete_workflow + @delete_workflow = ::Gapic::Config::Method.new delete_workflow_config + update_workflow_config = parent_rpcs.update_workflow if parent_rpcs.respond_to? :update_workflow + @update_workflow = ::Gapic::Config::Method.new update_workflow_config + list_workflow_revisions_config = parent_rpcs.list_workflow_revisions if parent_rpcs.respond_to? :list_workflow_revisions + @list_workflow_revisions = ::Gapic::Config::Method.new list_workflow_revisions_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb new file mode 100644 index 000000000000..2c4bc8c1e0e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/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 Workflows + module V1 + module Workflows + # Credentials for the Workflows API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "WORKFLOWS_CREDENTIALS", + "WORKFLOWS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "WORKFLOWS_CREDENTIALS_JSON", + "WORKFLOWS_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-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb new file mode 100644 index 000000000000..8ed984c55f7f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Workflows + module V1 + module Workflows + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Workflows 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 Workflows 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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Workflows::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflows.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb new file mode 100644 index 000000000000..7c5a1c321b45 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/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 Workflows + module V1 + module Workflows + # Path helper methods for the Workflows API. + module Paths + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified CryptoKeyVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # @param crypto_key_version [String] + # + # @return [::String] + def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" + end + + ## + # Create a fully-qualified 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 Workflow 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 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 diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb new file mode 100644 index 000000000000..250354de6315 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/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/workflows/v1/version" +require "google/cloud/workflows/v1/bindings_override" + +require "google/cloud/workflows/v1/workflows/credentials" +require "google/cloud/workflows/v1/workflows/paths" +require "google/cloud/workflows/v1/workflows/rest/operations" +require "google/cloud/workflows/v1/workflows/rest/client" + +module Google + module Cloud + module Workflows + module V1 + ## + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/workflows/v1/workflows/rest" + # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + module Workflows + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/workflows/v1/workflows/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb new file mode 100644 index 000000000000..d0dd3d1e2592 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb @@ -0,0 +1,997 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/workflows/v1/workflows_pb" +require "google/cloud/workflows/v1/workflows/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Workflows + module V1 + module Workflows + module Rest + ## + # REST client for the Workflows service. + # + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workflows_stub + + ## + # Configure the Workflows Client class. + # + # See {::Google::Cloud::Workflows::V1::Workflows::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Workflows clients + # ::Google::Cloud::Workflows::V1::Workflows::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", "Workflows", "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 Workflows Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workflows::V1::Workflows::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 + @workflows_stub.universe_domain + end + + ## + # Create a new Workflows REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Workflows 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::Workflows::V1::Workflows::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 + + @workflows_stub = ::Google::Cloud::Workflows::V1::Workflows::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @workflows_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 = @workflows_stub.endpoint + config.universe_domain = @workflows_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @workflows_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Workflows::V1::Workflows::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 + @workflows_stub.logger + end + + # Service calls + + ## + # Lists workflows in a given project and location. + # The default order is not specified. + # + # @overload list_workflows(request, options = nil) + # Pass arguments to `list_workflows` via a request object, either of type + # {::Google::Cloud::Workflows::V1::ListWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::ListWorkflowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_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. Project and location from which the workflows should be listed. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Maximum number of workflows to return per call. The service might return + # fewer than this value even if not at the end of the collection. If a value + # is not specified, a default value of 500 is used. The maximum permitted + # value is 1000 and values greater than 1000 are coerced down to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListWorkflows` must + # match the call that provided the page token. + # @param filter [::String] + # Filter to restrict results to specific workflows. + # For details, see AIP-160. + # + # For example, if you are using the Google APIs Explorer: + # + # `state="SUCCEEDED"` + # + # or + # + # `createTime>"2023-08-01" AND state="FAILED"` + # @param order_by [::String] + # Comma-separated list of fields that specify the order of the results. + # Default sorting order for a field is ascending. To specify descending order + # for a field, append a "desc" suffix. + # If not specified, the results are returned in an unspecified order. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::ListWorkflowsRequest.new + # + # # Call the list_workflows method. + # result = client.list_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::Workflows::V1::Workflow. + # p item + # end + # + def list_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::ListWorkflowsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workflows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.list_workflows request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workflows_stub, :list_workflows, "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 + + ## + # Gets details of a single workflow. + # + # @overload get_workflow(request, options = nil) + # Pass arguments to `get_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1::GetWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::GetWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workflow(name: nil, revision_id: nil) + # Pass arguments to `get_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. Name of the workflow for which information should be retrieved. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @param revision_id [::String] + # Optional. The revision of the workflow to retrieve. If the revision_id is + # empty, the latest revision is retrieved. + # The format is "000001-a4d", where the first six characters define + # the zero-padded decimal revision number. They are followed by a hyphen and + # three hexadecimal characters. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::V1::Workflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::V1::Workflow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::GetWorkflowRequest.new + # + # # Call the get_workflow method. + # result = client.get_workflow request + # + # # The returned object is of type Google::Cloud::Workflows::V1::Workflow. + # p result + # + def get_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::GetWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.get_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 + + ## + # Creates a new workflow. If a workflow with the specified name already + # exists in the specified project and location, the long running operation + # returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + # + # @overload create_workflow(request, options = nil) + # Pass arguments to `create_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1::CreateWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::CreateWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workflow(parent: nil, workflow: nil, workflow_id: nil) + # Pass arguments to `create_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. Project and location in which the workflow should be created. + # Format: projects/\\{project}/locations/\\{location} + # @param workflow [::Google::Cloud::Workflows::V1::Workflow, ::Hash] + # Required. Workflow to be created. + # @param workflow_id [::String] + # Required. The ID of the workflow to be created. It has to fulfill the + # following requirements: + # + # * Must contain only letters, numbers, underscores and hyphens. + # * Must start with a letter. + # * Must be between 1-64 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project and 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/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::CreateWorkflowRequest.new + # + # # Call the create_workflow method. + # result = client.create_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::CreateWorkflowRequest + + # Converts hash and nil to an 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_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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.create_workflow request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workflow with the specified name. + # This method also cancels and deletes all running executions of the + # workflow. + # + # @overload delete_workflow(request, options = nil) + # Pass arguments to `delete_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1::DeleteWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::DeleteWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workflow(name: nil) + # Pass arguments to `delete_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. Name of the workflow to be deleted. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new + # + # # Call the delete_workflow method. + # result = client.delete_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.delete_workflow request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workflow. + # Running this method has no impact on already running executions of the + # workflow. A new revision of the workflow might be created as a result of a + # successful update operation. In that case, the new revision is used + # in new workflow executions. + # + # @overload update_workflow(request, options = nil) + # Pass arguments to `update_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1::UpdateWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::UpdateWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workflow(workflow: nil, update_mask: nil) + # Pass arguments to `update_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 workflow [::Google::Cloud::Workflows::V1::Workflow, ::Hash] + # Required. Workflow to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields to be updated. If not present, the entire workflow + # will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new + # + # # Call the update_workflow method. + # result = client.update_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.update_workflow request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 revisions for a given workflow. + # + # @overload list_workflow_revisions(request, options = nil) + # Pass arguments to `list_workflow_revisions` via a request object, either of type + # {::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workflow_revisions(name: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workflow_revisions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Workflow for which the revisions should be listed. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @param page_size [::Integer] + # The maximum number of revisions to return per page. If a value is not + # specified, a default value of 20 is used. The maximum permitted value is + # 100. Values greater than 100 are coerced down to 100. + # @param page_token [::String] + # The page token, received from a previous ListWorkflowRevisions call. + # Provide this to retrieve the subsequent page. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new + # + # # Call the list_workflow_revisions method. + # result = client.list_workflow_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::Workflows::V1::Workflow. + # p item + # end + # + def list_workflow_revisions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workflow_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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workflow_revisions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workflow_revisions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.list_workflow_revisions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workflows_stub, :list_workflow_revisions, "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 + + ## + # Configuration class for the Workflows REST API. + # + # This class represents the configuration for Workflows 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::Workflows::V1::Workflows::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_workflows to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_workflows.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_workflows.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflows.googleapis.com" + + config_attr :endpoint, nil, ::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 Workflows API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workflows + ## + # RPC-specific configuration for `get_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workflow + ## + # RPC-specific configuration for `create_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workflow + ## + # RPC-specific configuration for `delete_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workflow + ## + # RPC-specific configuration for `update_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workflow + ## + # RPC-specific configuration for `list_workflow_revisions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workflow_revisions + + # @private + def initialize parent_rpcs = nil + list_workflows_config = parent_rpcs.list_workflows if parent_rpcs.respond_to? :list_workflows + @list_workflows = ::Gapic::Config::Method.new list_workflows_config + get_workflow_config = parent_rpcs.get_workflow if parent_rpcs.respond_to? :get_workflow + @get_workflow = ::Gapic::Config::Method.new get_workflow_config + create_workflow_config = parent_rpcs.create_workflow if parent_rpcs.respond_to? :create_workflow + @create_workflow = ::Gapic::Config::Method.new create_workflow_config + delete_workflow_config = parent_rpcs.delete_workflow if parent_rpcs.respond_to? :delete_workflow + @delete_workflow = ::Gapic::Config::Method.new delete_workflow_config + update_workflow_config = parent_rpcs.update_workflow if parent_rpcs.respond_to? :update_workflow + @update_workflow = ::Gapic::Config::Method.new update_workflow_config + list_workflow_revisions_config = parent_rpcs.list_workflow_revisions if parent_rpcs.respond_to? :list_workflow_revisions + @list_workflow_revisions = ::Gapic::Config::Method.new list_workflow_revisions_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb new file mode 100644 index 000000000000..7aead07230f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Workflows + module V1 + module Workflows + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Workflows 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 Workflows 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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workflows::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflows.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb new file mode 100644 index 000000000000..c36b18474d53 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb @@ -0,0 +1,449 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workflows/v1/workflows_pb" + +module Google + module Cloud + module Workflows + module V1 + module Workflows + module Rest + ## + # REST service stub for the Workflows 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_workflows REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::ListWorkflowsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::V1::ListWorkflowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::V1::ListWorkflowsResponse] + # A result object deserialized from the server's reply + def list_workflows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_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_workflows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workflows::V1::ListWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::GetWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::V1::Workflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::V1::Workflow] + # A result object deserialized from the server's reply + def get_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workflows::V1::Workflow.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_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::CreateWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_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_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::DeleteWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::UpdateWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_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: "update_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workflow_revisions REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse] + # A result object deserialized from the server's reply + def list_workflow_revisions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workflow_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_workflow_revisions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse.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_workflows REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::ListWorkflowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workflows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workflows", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::GetWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::CreateWorkflowRequest] + # 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_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/workflows", + body: "workflow", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::DeleteWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::UpdateWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{workflow.name}", + body: "workflow", + matches: [ + ["workflow.name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workflow_revisions REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workflow_revisions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}:listRevisions", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb new file mode 100644 index 000000000000..cfa8106f8498 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/workflows/v1/workflows.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)google/cloud/workflows/v1/workflows.proto\x12\x19google.cloud.workflows.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8d\r\n\x08Workflow\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12=\n\x05state\x18\x03 \x01(\x0e\x32).google.cloud.workflows.v1.Workflow.StateB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32/.google.cloud.workflows.v1.Workflow.LabelsEntry\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12\x19\n\x0fsource_contents\x18\n \x01(\tH\x00\x12\x42\n\x0f\x63rypto_key_name\x18\x0b \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12H\n\x0bstate_error\x18\x0c \x01(\x0b\x32..google.cloud.workflows.v1.Workflow.StateErrorB\x03\xe0\x41\x03\x12M\n\x0e\x63\x61ll_log_level\x18\r \x01(\x0e\x32\x30.google.cloud.workflows.v1.Workflow.CallLogLevelB\x03\xe0\x41\x01\x12P\n\ruser_env_vars\x18\x0e \x03(\x0b\x32\x34.google.cloud.workflows.v1.Workflow.UserEnvVarsEntryB\x03\xe0\x41\x01\x12V\n\x17\x65xecution_history_level\x18\x0f \x01(\x0e\x32\x30.google.cloud.workflows.v1.ExecutionHistoryLevelB\x03\xe0\x41\x01\x12?\n\x0c\x61ll_kms_keys\x18\x10 \x03(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12O\n\x15\x61ll_kms_keys_versions\x18\x11 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12L\n\x12\x63rypto_key_version\x18\x12 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12\x46\n\x04tags\x18\x13 \x03(\x0b\x32-.google.cloud.workflows.v1.Workflow.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1a\x8d\x01\n\nStateError\x12\x0f\n\x07\x64\x65tails\x18\x01 \x01(\t\x12\x41\n\x04type\x18\x02 \x01(\x0e\x32\x33.google.cloud.workflows.v1.Workflow.StateError.Type\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tKMS_ERROR\x10\x01\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\x10UserEnvVarsEntry\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\";\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0f\n\x0bUNAVAILABLE\x10\x02\"d\n\x0c\x43\x61llLogLevel\x12\x1e\n\x1a\x43\x41LL_LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rLOG_ALL_CALLS\x10\x01\x12\x13\n\x0fLOG_ERRORS_ONLY\x10\x02\x12\x0c\n\x08LOG_NONE\x10\x03:d\xea\x41\x61\n!workflows.googleapis.com/Workflow\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/workflows\x12\x9f\x01\n\x0bGetWorkflow\x12-.google.cloud.workflows.v1.GetWorkflowRequest\x1a#.google.cloud.workflows.v1.Workflow\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/workflows/*}\x12\xe0\x01\n\x0e\x43reateWorkflow\x12\x30.google.cloud.workflows.v1.CreateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\xda\x41\x1bparent,workflow,workflow_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/workflows:\x08workflow\x12\xcc\x01\n\x0e\x44\x65leteWorkflow\x12\x30.google.cloud.workflows.v1.DeleteWorkflowRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/workflows/*}\x12\xe2\x01\n\x0eUpdateWorkflow\x12\x30.google.cloud.workflows.v1.UpdateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\xda\x41\x14workflow,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{workflow.name=projects/*/locations/*/workflows/*}:\x08workflow\x12\xcf\x01\n\x15ListWorkflowRevisions\x12\x37.google.cloud.workflows.v1.ListWorkflowRevisionsRequest\x1a\x38.google.cloud.workflows.v1.ListWorkflowRevisionsResponse\"C\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/workflows/*}:listRevisions\x1aL\xca\x41\x18workflows.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8d\x03\n\x1d\x63om.google.cloud.workflows.v1B\x0eWorkflowsProtoP\x01Z;cloud.google.com/go/workflows/apiv1/workflowspb;workflowspb\xea\x41v\n!cloudkms.googleapis.com/CryptoKey\x12Qprojects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}\xea\x41\xa2\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12vprojects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Workflows + module V1 + Workflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow").msgclass + Workflow::StateError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.StateError").msgclass + Workflow::StateError::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.StateError.Type").enummodule + Workflow::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.State").enummodule + Workflow::CallLogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.CallLogLevel").enummodule + ListWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowsRequest").msgclass + ListWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowsResponse").msgclass + GetWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.GetWorkflowRequest").msgclass + CreateWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.CreateWorkflowRequest").msgclass + DeleteWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.DeleteWorkflowRequest").msgclass + UpdateWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.UpdateWorkflowRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.OperationMetadata").msgclass + ListWorkflowRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowRevisionsRequest").msgclass + ListWorkflowRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowRevisionsResponse").msgclass + ExecutionHistoryLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ExecutionHistoryLevel").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb new file mode 100644 index 000000000000..d568aa342f04 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb @@ -0,0 +1,66 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/workflows/v1/workflows.proto for package 'google.cloud.workflows.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/workflows/v1/workflows_pb' + +module Google + module Cloud + module Workflows + module V1 + module Workflows + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.workflows.v1.Workflows' + + # Lists workflows in a given project and location. + # The default order is not specified. + rpc :ListWorkflows, ::Google::Cloud::Workflows::V1::ListWorkflowsRequest, ::Google::Cloud::Workflows::V1::ListWorkflowsResponse + # Gets details of a single workflow. + rpc :GetWorkflow, ::Google::Cloud::Workflows::V1::GetWorkflowRequest, ::Google::Cloud::Workflows::V1::Workflow + # Creates a new workflow. If a workflow with the specified name already + # exists in the specified project and location, the long running operation + # returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + rpc :CreateWorkflow, ::Google::Cloud::Workflows::V1::CreateWorkflowRequest, ::Google::Longrunning::Operation + # Deletes a workflow with the specified name. + # This method also cancels and deletes all running executions of the + # workflow. + rpc :DeleteWorkflow, ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest, ::Google::Longrunning::Operation + # Updates an existing workflow. + # Running this method has no impact on already running executions of the + # workflow. A new revision of the workflow might be created as a result of a + # successful update operation. In that case, the new revision is used + # in new workflow executions. + rpc :UpdateWorkflow, ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest, ::Google::Longrunning::Operation + # Lists revisions for a given workflow. + rpc :ListWorkflowRevisions, ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest, ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/README.md new file mode 100644 index 000000000000..5e25ae83a219 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Workflows 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-workflows-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb new file mode 100644 index 000000000000..78a09faef384 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb @@ -0,0 +1,424 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Workflows + module V1 + # Workflow program to be executed by Workflows. + # @!attribute [rw] name + # @return [::String] + # The resource name of the workflow. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow}. + # This is a workflow-wide field and is not tied to a specific revision. + # @!attribute [rw] description + # @return [::String] + # Description of the workflow provided by the user. + # Must be at most 1000 Unicode characters long. + # This is a workflow-wide field and is not tied to a specific revision. + # @!attribute [r] state + # @return [::Google::Cloud::Workflows::V1::Workflow::State] + # Output only. State of the workflow deployment. + # @!attribute [r] revision_id + # @return [::String] + # Output only. The revision of the workflow. + # A new revision of a workflow is created as a result of updating the + # following properties of a workflow: + # + # - {::Google::Cloud::Workflows::V1::Workflow#service_account Service account} + # - [Workflow code to be + # executed][google.cloud.workflows.v1.Workflow.source_contents] + # + # The format is "000001-a4d", where the first six characters define + # the zero-padded revision ordinal number. They are followed by a hyphen and + # three hexadecimal random characters. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp for when the workflow was created. + # This is a workflow-wide field and is not tied to a specific revision. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp for when the workflow was last updated. + # This is a workflow-wide field and is not tied to a specific revision. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp for the latest revision of the workflow's + # creation. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with this workflow. + # Labels can contain at most 64 entries. Keys and values can be no longer + # than 63 characters and can only contain lowercase letters, numeric + # characters, underscores, and dashes. Label keys must start with a letter. + # International characters are allowed. + # This is a workflow-wide field and is not tied to a specific revision. + # @!attribute [rw] service_account + # @return [::String] + # The service account associated with the latest workflow version. + # This service account represents the identity of the workflow and determines + # what permissions the workflow has. + # Format: projects/\\{project}/serviceAccounts/\\{account} or \\{account} + # + # Using `-` as a wildcard for the `{project}` or not providing one at all + # will infer the project from the account. The `{account}` value can be the + # `email` address or the `unique_id` of the service account. + # + # If not provided, workflow will use the project's default service account. + # Modifying this field for an existing workflow results in a new workflow + # revision. + # @!attribute [rw] source_contents + # @return [::String] + # Workflow code to be executed. The size limit is 128KB. + # @!attribute [rw] crypto_key_name + # @return [::String] + # Optional. The resource name of a KMS crypto key used to encrypt or decrypt + # the data associated with the workflow. + # + # Format: + # projects/\\{project}/locations/\\{location}/keyRings/\\{keyRing}/cryptoKeys/\\{cryptoKey} + # + # Using `-` as a wildcard for the `{project}` or not providing one at all + # will infer the project from the account. + # + # If not provided, data associated with the workflow will not be + # CMEK-encrypted. + # @!attribute [r] state_error + # @return [::Google::Cloud::Workflows::V1::Workflow::StateError] + # Output only. Error regarding the state of the workflow. For example, this + # field will have error details if the execution data is unavailable due to + # revoked KMS key permissions. + # @!attribute [rw] call_log_level + # @return [::Google::Cloud::Workflows::V1::Workflow::CallLogLevel] + # Optional. Describes the level of platform logging to apply to calls and + # call responses during executions of this workflow. If both the workflow and + # the execution specify a logging level, the execution level takes + # precedence. + # @!attribute [rw] user_env_vars + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined environment variables associated with this workflow + # revision. This map has a maximum length of 20. Each string can take up to + # 4KiB. Keys cannot be empty strings and cannot start with "GOOGLE" or + # "WORKFLOWS". + # @!attribute [rw] execution_history_level + # @return [::Google::Cloud::Workflows::V1::ExecutionHistoryLevel] + # Optional. Describes the execution history level to apply to this workflow. + # @!attribute [r] all_kms_keys + # @return [::Array<::String>] + # Output only. A list of all KMS crypto keys used to encrypt or decrypt the + # data associated with the workflow. + # @!attribute [r] all_kms_keys_versions + # @return [::Array<::String>] + # Output only. A list of all KMS crypto key versions used to encrypt or + # decrypt the data associated with the workflow. + # @!attribute [r] crypto_key_version + # @return [::String] + # Output only. The resource name of a KMS crypto key version used to encrypt + # or decrypt the data associated with the workflow. + # + # Format: + # projects/\\{project}/locations/\\{location}/keyRings/\\{keyRing}/cryptoKeys/\\{cryptoKey}/cryptoKeyVersions/\\{cryptoKeyVersion} + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tags associated with this workflow. + class Workflow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes an error related to the current state of the workflow. + # @!attribute [rw] details + # @return [::String] + # Provides specifics about the error. + # @!attribute [rw] type + # @return [::Google::Cloud::Workflows::V1::Workflow::StateError::Type] + # The type of this state error. + class StateError + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the possibled types of a state error. + module Type + # No type specified. + TYPE_UNSPECIFIED = 0 + + # Caused by an issue with KMS. + KMS_ERROR = 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class UserEnvVarsEntry + 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 + + # Describes the current state of workflow deployment. + module State + # Invalid state. + STATE_UNSPECIFIED = 0 + + # The workflow has been deployed successfully and is serving. + ACTIVE = 1 + + # Workflow data is unavailable. See the `state_error` field. + UNAVAILABLE = 2 + end + + # Describes the level of platform logging to apply to calls and call + # responses during workflow executions. + module CallLogLevel + # No call logging level specified. + CALL_LOG_LEVEL_UNSPECIFIED = 0 + + # Log all call steps within workflows, all call returns, and all exceptions + # raised. + LOG_ALL_CALLS = 1 + + # Log only exceptions that are raised from call steps within workflows. + LOG_ERRORS_ONLY = 2 + + # Explicitly log nothing. + LOG_NONE = 3 + end + end + + # Request for the + # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflows ListWorkflows} + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location from which the workflows should be listed. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of workflows to return per call. The service might return + # fewer than this value even if not at the end of the collection. If a value + # is not specified, a default value of 500 is used. The maximum permitted + # value is 1000 and values greater than 1000 are coerced down to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListWorkflows` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Filter to restrict results to specific workflows. + # For details, see AIP-160. + # + # For example, if you are using the Google APIs Explorer: + # + # `state="SUCCEEDED"` + # + # or + # + # `createTime>"2023-08-01" AND state="FAILED"` + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of fields that specify the order of the results. + # Default sorting order for a field is ascending. To specify descending order + # for a field, append a "desc" suffix. + # If not specified, the results are returned in an unspecified order. + class ListWorkflowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the + # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflows ListWorkflows} + # method. + # @!attribute [rw] workflows + # @return [::Array<::Google::Cloud::Workflows::V1::Workflow>] + # The workflows that match the request. + # @!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>] + # Unreachable resources. + class ListWorkflowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::V1::Workflows::Client#get_workflow GetWorkflow} method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workflow for which information should be retrieved. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @!attribute [rw] revision_id + # @return [::String] + # Optional. The revision of the workflow to retrieve. If the revision_id is + # empty, the latest revision is retrieved. + # The format is "000001-a4d", where the first six characters define + # the zero-padded decimal revision number. They are followed by a hyphen and + # three hexadecimal characters. + class GetWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::V1::Workflows::Client#create_workflow CreateWorkflow} + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location in which the workflow should be created. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] workflow + # @return [::Google::Cloud::Workflows::V1::Workflow] + # Required. Workflow to be created. + # @!attribute [rw] workflow_id + # @return [::String] + # Required. The ID of the workflow to be created. It has to fulfill the + # following requirements: + # + # * Must contain only letters, numbers, underscores and hyphens. + # * Must start with a letter. + # * Must be between 1-64 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project and location. + class CreateWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::V1::Workflows::Client#delete_workflow DeleteWorkflow} + # method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workflow to be deleted. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + class DeleteWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::V1::Workflows::Client#update_workflow UpdateWorkflow} + # method. + # @!attribute [rw] workflow + # @return [::Google::Cloud::Workflows::V1::Workflow] + # Required. Workflow to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # List of fields to be updated. If not present, the entire workflow + # will be updated. + class UpdateWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation finished running. + # @!attribute [rw] target + # @return [::String] + # Server-defined resource path for the target of the operation. + # @!attribute [rw] verb + # @return [::String] + # Name of the verb executed by the operation. + # @!attribute [rw] api_version + # @return [::String] + # API version used to start the operation. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions ListWorkflowRevisions} + # method. + # @!attribute [rw] name + # @return [::String] + # Required. Workflow for which the revisions should be listed. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of revisions to return per page. If a value is not + # specified, a default value of 20 is used. The maximum permitted value is + # 100. Values greater than 100 are coerced down to 100. + # @!attribute [rw] page_token + # @return [::String] + # The page token, received from a previous ListWorkflowRevisions call. + # Provide this to retrieve the subsequent page. + class ListWorkflowRevisionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the + # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions ListWorkflowRevisions} + # method. + # @!attribute [rw] workflows + # @return [::Array<::Google::Cloud::Workflows::V1::Workflow>] + # The revisions of the workflow, ordered in reverse chronological order. + # @!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 ListWorkflowRevisionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Define possible options for enabling the execution history level. + module ExecutionHistoryLevel + # The default/unset value. + EXECUTION_HISTORY_LEVEL_UNSPECIFIED = 0 + + # Enable execution history basic feature. + EXECUTION_HISTORY_BASIC = 1 + + # Enable execution history detailed feature. + EXECUTION_HISTORY_DETAILED = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-workflows-v1/snippets/Gemfile new file mode 100644 index 000000000000..3f40a63d2540 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1", path: "../" +else + gem "google-cloud-workflows-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-workflows-v1/snippets/snippet_metadata_google.cloud.workflows.v1.json b/owl-bot-staging/google-cloud-workflows-v1/snippets/snippet_metadata_google.cloud.workflows.v1.json new file mode 100644 index 000000000000..64415098c15f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/snippets/snippet_metadata_google.cloud.workflows.v1.json @@ -0,0 +1,255 @@ +{ + "client_library": { + "name": "google-cloud-workflows-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.workflows.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "workflows_v1_generated_Workflows_ListWorkflows_sync", + "title": "Snippet for the list_workflows call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#list_workflows.", + "file": "workflows/list_workflows.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workflows", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#list_workflows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1::ListWorkflowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::V1::ListWorkflowsResponse", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" + }, + "method": { + "short_name": "ListWorkflows", + "full_name": "google.cloud.workflows.v1.Workflows.ListWorkflows", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1.Workflows" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflows_v1_generated_Workflows_GetWorkflow_sync", + "title": "Snippet for the get_workflow call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#get_workflow.", + "file": "workflows/get_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workflow", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#get_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1::GetWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::V1::Workflow", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" + }, + "method": { + "short_name": "GetWorkflow", + "full_name": "google.cloud.workflows.v1.Workflows.GetWorkflow", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1.Workflows" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflows_v1_generated_Workflows_CreateWorkflow_sync", + "title": "Snippet for the create_workflow call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#create_workflow.", + "file": "workflows/create_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workflow", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#create_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1::CreateWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" + }, + "method": { + "short_name": "CreateWorkflow", + "full_name": "google.cloud.workflows.v1.Workflows.CreateWorkflow", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1.Workflows" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflows_v1_generated_Workflows_DeleteWorkflow_sync", + "title": "Snippet for the delete_workflow call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#delete_workflow.", + "file": "workflows/delete_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workflow", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#delete_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1::DeleteWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" + }, + "method": { + "short_name": "DeleteWorkflow", + "full_name": "google.cloud.workflows.v1.Workflows.DeleteWorkflow", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1.Workflows" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflows_v1_generated_Workflows_UpdateWorkflow_sync", + "title": "Snippet for the update_workflow call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#update_workflow.", + "file": "workflows/update_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workflow", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#update_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1::UpdateWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" + }, + "method": { + "short_name": "UpdateWorkflow", + "full_name": "google.cloud.workflows.v1.Workflows.UpdateWorkflow", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1.Workflows" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflows_v1_generated_Workflows_ListWorkflowRevisions_sync", + "title": "Snippet for the list_workflow_revisions call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions.", + "file": "workflows/list_workflow_revisions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workflow_revisions", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" + }, + "method": { + "short_name": "ListWorkflowRevisions", + "full_name": "google.cloud.workflows.v1.Workflows.ListWorkflowRevisions", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1.Workflows" + } + } + }, + "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-workflows-v1/snippets/workflows/create_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb new file mode 100644 index 000000000000..57bb5d7052f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflows_v1_generated_Workflows_CreateWorkflow_sync] +require "google/cloud/workflows/v1" + +## +# Snippet for the create_workflow call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1::Workflows::Client#create_workflow. +# +def create_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1::CreateWorkflowRequest.new + + # Call the create_workflow method. + result = client.create_workflow request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workflows_v1_generated_Workflows_CreateWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb new file mode 100644 index 000000000000..ee3a675341df --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflows_v1_generated_Workflows_DeleteWorkflow_sync] +require "google/cloud/workflows/v1" + +## +# Snippet for the delete_workflow call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1::Workflows::Client#delete_workflow. +# +def delete_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new + + # Call the delete_workflow method. + result = client.delete_workflow request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workflows_v1_generated_Workflows_DeleteWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb new file mode 100644 index 000000000000..8e945eb77b52 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/get_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 workflows_v1_generated_Workflows_GetWorkflow_sync] +require "google/cloud/workflows/v1" + +## +# Snippet for the get_workflow call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1::Workflows::Client#get_workflow. +# +def get_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1::GetWorkflowRequest.new + + # Call the get_workflow method. + result = client.get_workflow request + + # The returned object is of type Google::Cloud::Workflows::V1::Workflow. + p result +end +# [END workflows_v1_generated_Workflows_GetWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb new file mode 100644 index 000000000000..24fa4adf9ff9 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflow_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 workflows_v1_generated_Workflows_ListWorkflowRevisions_sync] +require "google/cloud/workflows/v1" + +## +# Snippet for the list_workflow_revisions call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions. +# +def list_workflow_revisions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new + + # Call the list_workflow_revisions method. + result = client.list_workflow_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::Workflows::V1::Workflow. + p item + end +end +# [END workflows_v1_generated_Workflows_ListWorkflowRevisions_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb new file mode 100644 index 000000000000..423d261480f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_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 workflows_v1_generated_Workflows_ListWorkflows_sync] +require "google/cloud/workflows/v1" + +## +# Snippet for the list_workflows call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1::Workflows::Client#list_workflows. +# +def list_workflows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1::ListWorkflowsRequest.new + + # Call the list_workflows method. + result = client.list_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::Workflows::V1::Workflow. + p item + end +end +# [END workflows_v1_generated_Workflows_ListWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb new file mode 100644 index 000000000000..20e240695166 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflows_v1_generated_Workflows_UpdateWorkflow_sync] +require "google/cloud/workflows/v1" + +## +# Snippet for the update_workflow call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1::Workflows::Client#update_workflow. +# +def update_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new + + # Call the update_workflow method. + result = client.update_workflow request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workflows_v1_generated_Workflows_UpdateWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb new file mode 100644 index 000000000000..733d55434ff1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_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/workflows/v1/workflows_pb" +require "google/cloud/workflows/v1/workflows_services_pb" +require "google/cloud/workflows/v1/workflows" + +class ::Google::Cloud::Workflows::V1::Workflows::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Workflows::V1::Workflows::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::Workflows::V1::Workflows::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb new file mode 100644 index 000000000000..940534eeb434 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_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/workflows/v1/workflows" + +class ::Google::Cloud::Workflows::V1::Workflows::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_crypto_key_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Workflows::V1::Workflows::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_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::Workflows::V1::Workflows::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_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::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.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-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb new file mode 100644 index 000000000000..475012b3f7fd --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb @@ -0,0 +1,433 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/workflows/v1/workflows_pb" +require "google/cloud/workflows/v1/workflows/rest" + + +class ::Google::Cloud::Workflows::V1::Workflows::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_workflows + # Create test objects. + client_result = ::Google::Cloud::Workflows::V1::ListWorkflowsResponse.new + http_response = OpenStruct.new 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_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_list_workflows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workflows_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workflows parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workflows ::Google::Cloud::Workflows::V1::ListWorkflowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workflows(::Google::Cloud::Workflows::V1::ListWorkflowsRequest.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_workflows_client_stub.call_count + end + end + end + + def test_get_workflow + # Create test objects. + client_result = ::Google::Cloud::Workflows::V1::Workflow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + revision_id = "hello world" + + get_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_get_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workflow({ name: name, revision_id: revision_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workflow name: name, revision_id: revision_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workflow ::Google::Cloud::Workflows::V1::GetWorkflowRequest.new(name: name, revision_id: revision_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workflow({ name: name, revision_id: revision_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workflow(::Google::Cloud::Workflows::V1::GetWorkflowRequest.new(name: name, revision_id: revision_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workflow_client_stub.call_count + end + end + end + + def test_create_workflow + # Create test objects. + 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" + workflow = {} + workflow_id = "hello world" + + create_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_create_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workflow ::Google::Cloud::Workflows::V1::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workflow(::Google::Cloud::Workflows::V1::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workflow_client_stub.call_count + end + end + end + + def test_delete_workflow + # Create test objects. + 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_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_delete_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workflow ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workflow(::Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workflow_client_stub.call_count + end + end + end + + def test_update_workflow + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workflow = {} + update_mask = {} + + update_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_update_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workflow ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workflow({ workflow: workflow, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workflow(::Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workflow_client_stub.call_count + end + end + end + + def test_list_workflow_revisions + # Create test objects. + client_result = ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_workflow_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_list_workflow_revisions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workflow_revisions_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workflow_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workflow_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workflow_revisions ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workflow_revisions({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workflow_revisions(::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_workflow_revisions_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::Workflows::V1::Workflows::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::Workflows::V1::Workflows::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb new file mode 100644 index 000000000000..588d6ca4b23a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb @@ -0,0 +1,511 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/workflows/v1/workflows_pb" +require "google/cloud/workflows/v1/workflows" + +class ::Google::Cloud::Workflows::V1::Workflows::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_workflows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::V1::ListWorkflowsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workflows, name + assert_kind_of ::Google::Cloud::Workflows::V1::ListWorkflowsRequest, 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_workflows_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workflows parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workflows ::Google::Cloud::Workflows::V1::ListWorkflowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workflows(::Google::Cloud::Workflows::V1::ListWorkflowsRequest.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_workflows_client_stub.call_rpc_count + end + end + + def test_get_workflow + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::V1::Workflow.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + revision_id = "hello world" + + get_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workflow, name + assert_kind_of ::Google::Cloud::Workflows::V1::GetWorkflowRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["revision_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workflow({ name: name, revision_id: revision_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workflow name: name, revision_id: revision_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workflow ::Google::Cloud::Workflows::V1::GetWorkflowRequest.new(name: name, revision_id: revision_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workflow({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workflow(::Google::Cloud::Workflows::V1::GetWorkflowRequest.new(name: name, revision_id: revision_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workflow_client_stub.call_rpc_count + end + end + + def test_create_workflow + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workflow = {} + workflow_id = "hello world" + + create_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workflow, name + assert_kind_of ::Google::Cloud::Workflows::V1::CreateWorkflowRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::V1::Workflow), request["workflow"] + assert_equal "hello world", request["workflow_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workflow ::Google::Cloud::Workflows::V1::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workflow(::Google::Cloud::Workflows::V1::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_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_workflow_client_stub.call_rpc_count + end + end + + def test_delete_workflow + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workflow, name + assert_kind_of ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workflow({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workflow name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workflow ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workflow({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workflow(::Google::Cloud::Workflows::V1::DeleteWorkflowRequest.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_workflow_client_stub.call_rpc_count + end + end + + def test_update_workflow + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workflow = {} + update_mask = {} + + update_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workflow, name + assert_kind_of ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::V1::Workflow), request["workflow"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workflow({ workflow: workflow, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_workflow workflow: workflow, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_workflow ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_workflow({ workflow: workflow, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_workflow(::Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new(workflow: workflow, 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_workflow_client_stub.call_rpc_count + end + end + + def test_list_workflow_revisions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + page_size = 42 + page_token = "hello world" + + list_workflow_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workflow_revisions, name + assert_kind_of ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_workflow_revisions_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workflow_revisions({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workflow_revisions name: name, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workflow_revisions ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workflow_revisions({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workflow_revisions(::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_workflow_revisions_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::Workflows::V1::Workflows::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::Workflows::V1::Workflows::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::Workflows::V1::Workflows::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Workflows::V1::Workflows::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::Workflows::V1::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Workflows::V1::Workflows::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1/test/helper.rb b/owl-bot-staging/google-cloud-workflows-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..1d4a95557ac5 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "workflows.googleapis.com", + "api_shortname": "workflows", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1beta/latest", + "distribution_name": "google-cloud-workflows-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "workflows", + "name_pretty": "Workflows V1beta API", + "product_documentation": "https://cloud.google.com/workflows/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details.", + "ruby-cloud-env-prefix": "WORKFLOWS", + "ruby-cloud-product-url": "https://cloud.google.com/workflows/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-workflows-v1beta/.rubocop.yml new file mode 100644 index 000000000000..40c98f2b2441 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workflows-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-workflows-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.toys.rb b/owl-bot-staging/google-cloud-workflows-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/.yardopts b/owl-bot-staging/google-cloud-workflows-v1beta/.yardopts new file mode 100644 index 000000000000..56f969dffb3b --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Workflows 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-workflows-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..5854f731e93e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workflows-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-workflows-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/workflows/v1beta" + +client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workflows/v1beta" + +::Google::Cloud::Workflows::V1beta::Workflows::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Workflows::V1beta::Workflows::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-workflows-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/workflows/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Workflows::V1beta::Workflows::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-workflows-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/Gemfile b/owl-bot-staging/google-cloud-workflows-v1beta/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-workflows-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/README.md b/owl-bot-staging/google-cloud-workflows-v1beta/README.md new file mode 100644 index 000000000000..9bd00b31c471 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Workflows V1beta API + +Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API. + +Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Workflows V1beta API. Most users should consider using +the main client gem, +[google-cloud-workflows](https://rubygems.org/gems/google-cloud-workflows). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-workflows-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/workflows.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/workflows/v1beta" + +client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new +request = ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new # (request fields as keyword arguments...) +response = client.list_workflows request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/workflows/) +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/workflows/v1beta" +require "logger" + +client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workflows`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workflows-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-workflows`. +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-workflows-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-workflows-v1beta/Rakefile b/owl-bot-staging/google-cloud-workflows-v1beta/Rakefile new file mode 100644 index 000000000000..26a1b0335b69 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WORKFLOWS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WORKFLOWS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/workflows/v1beta/workflows/credentials" + ::Google::Cloud::Workflows::V1beta::Workflows::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WORKFLOWS_PROJECT"] = project + ENV["WORKFLOWS_TEST_PROJECT"] = project + ENV["WORKFLOWS_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-workflows-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-workflows-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-workflows-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-workflows-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workflows-v1beta" + header "google-cloud-workflows-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workflows-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workflows-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-workflows-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-workflows-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-workflows-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-workflows-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..251ea95013fb --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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.workflows.v1beta", + "libraryPackage": "::Google::Cloud::Workflows::V1beta", + "services": { + "Workflows": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Workflows::V1beta::Workflows::Client", + "rpcs": { + "ListWorkflows": { + "methods": [ + "list_workflows" + ] + }, + "GetWorkflow": { + "methods": [ + "get_workflow" + ] + }, + "CreateWorkflow": { + "methods": [ + "create_workflow" + ] + }, + "DeleteWorkflow": { + "methods": [ + "delete_workflow" + ] + }, + "UpdateWorkflow": { + "methods": [ + "update_workflow" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/google-cloud-workflows-v1beta.gemspec b/owl-bot-staging/google-cloud-workflows-v1beta/google-cloud-workflows-v1beta.gemspec new file mode 100644 index 000000000000..443d6bd40ddd --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/google-cloud-workflows-v1beta.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workflows/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workflows-v1beta" + gem.version = Google::Cloud::Workflows::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details." + gem.summary = "Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb new file mode 100644 index 000000000000..6570d59e4c97 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google-cloud-workflows-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/workflows/v1beta" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb new file mode 100644 index 000000000000..8ffa325a3d21 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/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/workflows/v1beta/workflows" +require "google/cloud/workflows/v1beta/version" + +module Google + module Cloud + module Workflows + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/workflows/v1beta" + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/workflows/v1beta" + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + module V1beta + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/workflows/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb new file mode 100644 index 000000000000..89cc4db94d26 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/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 Workflows + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/workflows/v1beta/rest" + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + module V1beta + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workflows"] + parent_config = while namespace.any? + parent_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-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb new file mode 100644 index 000000000000..449f092f35af --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/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/workflows/v1beta/workflows/rest" +require "google/cloud/workflows/v1beta/bindings_override" +require "google/cloud/workflows/v1beta/version" + +module Google + module Cloud + module Workflows + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/workflows/v1beta/rest" + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + module V1beta + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/version.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/version.rb new file mode 100644 index 000000000000..0bdbdee492ae --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/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 Workflows + module V1beta + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb new file mode 100644 index 000000000000..0fcbf048c458 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.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/workflows/v1beta/version" + +require "google/cloud/workflows/v1beta/workflows/credentials" +require "google/cloud/workflows/v1beta/workflows/paths" +require "google/cloud/workflows/v1beta/workflows/operations" +require "google/cloud/workflows/v1beta/workflows/client" +require "google/cloud/workflows/v1beta/workflows/rest" + +module Google + module Cloud + module Workflows + module V1beta + ## + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/workflows/v1beta/workflows" + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/workflows/v1beta/workflows/rest" + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + module Workflows + end + end + end + end +end + +helper_path = ::File.join __dir__, "workflows", "helpers.rb" +require "google/cloud/workflows/v1beta/workflows/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb new file mode 100644 index 000000000000..9d115ffa4047 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb @@ -0,0 +1,952 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/workflows/v1beta/workflows_pb" +require "google/cloud/location" + +module Google + module Cloud + module Workflows + module V1beta + module Workflows + ## + # Client for the Workflows service. + # + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workflows_stub + + ## + # Configure the Workflows Client class. + # + # See {::Google::Cloud::Workflows::V1beta::Workflows::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Workflows clients + # ::Google::Cloud::Workflows::V1beta::Workflows::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workflows", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Workflows Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workflows::V1beta::Workflows::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @workflows_stub.universe_domain + end + + ## + # Create a new Workflows client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Workflows 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/workflows/v1beta/workflows_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 + + @workflows_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Workflows::V1beta::Workflows::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 + ) + + @workflows_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 = @workflows_stub.endpoint + config.universe_domain = @workflows_stub.universe_domain + config.logger = @workflows_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Workflows::V1beta::Workflows::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 + @workflows_stub.logger + end + + # Service calls + + ## + # Lists Workflows in a given project and location. + # The default order is not specified. + # + # @overload list_workflows(request, options = nil) + # Pass arguments to `list_workflows` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_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. Project and location from which the workflows should be listed. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Maximum number of workflows to return per call. The service may return + # fewer than this value. If the value is not specified, a default value of + # 500 will be used. The maximum permitted value is 1000 and values greater + # than 1000 will be coerced down to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListWorkflows` must + # match the call that provided the page token. + # @param filter [::String] + # Filter to restrict results to specific workflows. + # @param order_by [::String] + # Comma-separated list of fields that that specify the order of the results. + # Default sorting order for a field is ascending. To specify descending order + # for a field, append a " desc" suffix. + # If not specified, the results will be returned in an unspecified order. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1beta::Workflow>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1beta::Workflow>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new + # + # # Call the list_workflows method. + # result = client.list_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::Workflows::V1beta::Workflow. + # p item + # end + # + def list_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_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::Workflows::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_workflows.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :list_workflows, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workflows_stub, :list_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 + + ## + # Gets details of a single Workflow. + # + # @overload get_workflow(request, options = nil) + # Pass arguments to `get_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::GetWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workflow(name: nil) + # Pass arguments to `get_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. Name of the workflow which information should be retrieved. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workflows::V1beta::Workflow] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workflows::V1beta::Workflow] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new + # + # # Call the get_workflow method. + # result = client.get_workflow request + # + # # The returned object is of type Google::Cloud::Workflows::V1beta::Workflow. + # p result + # + def get_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_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::Workflows::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_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :get_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 + + ## + # Creates a new workflow. If a workflow with the specified name already + # exists in the specified project and location, the long running operation + # will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + # + # @overload create_workflow(request, options = nil) + # Pass arguments to `create_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workflow(parent: nil, workflow: nil, workflow_id: nil) + # Pass arguments to `create_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. Project and location in which the workflow should be created. + # Format: projects/\\{project}/locations/\\{location} + # @param workflow [::Google::Cloud::Workflows::V1beta::Workflow, ::Hash] + # Required. Workflow to be created. + # @param workflow_id [::String] + # Required. The ID of the workflow to be created. It has to fulfill the + # following requirements: + # + # * Must contain only letters, numbers, underscores and hyphens. + # * Must start with a letter. + # * Must be between 1-64 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project and 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/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new + # + # # Call the create_workflow method. + # result = client.create_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_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::Workflows::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_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :create_workflow, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 workflow with the specified name. + # This method also cancels and deletes all running executions of the + # workflow. + # + # @overload delete_workflow(request, options = nil) + # Pass arguments to `delete_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workflow(name: nil) + # Pass arguments to `delete_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. Name of the workflow to be deleted. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new + # + # # Call the delete_workflow method. + # result = client.delete_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_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::Workflows::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_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :delete_workflow, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 workflow. + # Running this method has no impact on already running executions of the + # workflow. A new revision of the workflow may be created as a result of a + # successful update operation. In that case, such revision will be used + # in new workflow executions. + # + # @overload update_workflow(request, options = nil) + # Pass arguments to `update_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workflow(workflow: nil, update_mask: nil) + # Pass arguments to `update_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 workflow [::Google::Cloud::Workflows::V1beta::Workflow, ::Hash] + # Required. Workflow to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields to be updated. If not present, the entire workflow + # will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new + # + # # Call the update_workflow method. + # result = client.update_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_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::Workflows::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.workflow&.name + header_params["workflow.name"] = request.workflow.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_workflow.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.call_rpc :update_workflow, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 Workflows API. + # + # This class represents the configuration for Workflows, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Workflows::V1beta::Workflows::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_workflows to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workflows::V1beta::Workflows::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_workflows.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_workflows.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Workflows::V1beta::Workflows::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflows.googleapis.com" + + config_attr :endpoint, nil, ::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 Workflows API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workflows + ## + # RPC-specific configuration for `get_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workflow + ## + # RPC-specific configuration for `create_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workflow + ## + # RPC-specific configuration for `delete_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workflow + ## + # RPC-specific configuration for `update_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workflow + + # @private + def initialize parent_rpcs = nil + list_workflows_config = parent_rpcs.list_workflows if parent_rpcs.respond_to? :list_workflows + @list_workflows = ::Gapic::Config::Method.new list_workflows_config + get_workflow_config = parent_rpcs.get_workflow if parent_rpcs.respond_to? :get_workflow + @get_workflow = ::Gapic::Config::Method.new get_workflow_config + create_workflow_config = parent_rpcs.create_workflow if parent_rpcs.respond_to? :create_workflow + @create_workflow = ::Gapic::Config::Method.new create_workflow_config + delete_workflow_config = parent_rpcs.delete_workflow if parent_rpcs.respond_to? :delete_workflow + @delete_workflow = ::Gapic::Config::Method.new delete_workflow_config + update_workflow_config = parent_rpcs.update_workflow if parent_rpcs.respond_to? :update_workflow + @update_workflow = ::Gapic::Config::Method.new update_workflow_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb new file mode 100644 index 000000000000..550b00fccd1b --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/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 Workflows + module V1beta + module Workflows + # Credentials for the Workflows API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "WORKFLOWS_CREDENTIALS", + "WORKFLOWS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "WORKFLOWS_CREDENTIALS_JSON", + "WORKFLOWS_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-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb new file mode 100644 index 000000000000..7011dce23d65 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Workflows + module V1beta + module Workflows + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Workflows 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 Workflows 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::Workflows::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::Workflows::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::Workflows::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::Workflows::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::Workflows::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflows.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb new file mode 100644 index 000000000000..8e6d9fdd43a9 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/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 Workflows + module V1beta + module Workflows + # Path helper methods for the Workflows 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 Workflow 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 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 diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb new file mode 100644 index 000000000000..c806faf98cba --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/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/workflows/v1beta/version" +require "google/cloud/workflows/v1beta/bindings_override" + +require "google/cloud/workflows/v1beta/workflows/credentials" +require "google/cloud/workflows/v1beta/workflows/paths" +require "google/cloud/workflows/v1beta/workflows/rest/operations" +require "google/cloud/workflows/v1beta/workflows/rest/client" + +module Google + module Cloud + module Workflows + module V1beta + ## + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/workflows/v1beta/workflows/rest" + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + module Workflows + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/workflows/v1beta/workflows/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb new file mode 100644 index 000000000000..129d779d0741 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb @@ -0,0 +1,882 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/errors" +require "google/cloud/workflows/v1beta/workflows_pb" +require "google/cloud/workflows/v1beta/workflows/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Workflows + module V1beta + module Workflows + module Rest + ## + # REST client for the Workflows service. + # + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workflows_stub + + ## + # Configure the Workflows Client class. + # + # See {::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Workflows clients + # ::Google::Cloud::Workflows::V1beta::Workflows::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", "Workflows", "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 + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Workflows Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workflows::V1beta::Workflows::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 + @workflows_stub.universe_domain + end + + ## + # Create a new Workflows REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Workflows 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::Workflows::V1beta::Workflows::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 + + @workflows_stub = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @workflows_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 = @workflows_stub.endpoint + config.universe_domain = @workflows_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @workflows_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Workflows::V1beta::Workflows::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 + @workflows_stub.logger + end + + # Service calls + + ## + # Lists Workflows in a given project and location. + # The default order is not specified. + # + # @overload list_workflows(request, options = nil) + # Pass arguments to `list_workflows` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_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. Project and location from which the workflows should be listed. + # Format: projects/\\{project}/locations/\\{location} + # @param page_size [::Integer] + # Maximum number of workflows to return per call. The service may return + # fewer than this value. If the value is not specified, a default value of + # 500 will be used. The maximum permitted value is 1000 and values greater + # than 1000 will be coerced down to 1000. + # @param page_token [::String] + # A page token, received from a previous `ListWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListWorkflows` must + # match the call that provided the page token. + # @param filter [::String] + # Filter to restrict results to specific workflows. + # @param order_by [::String] + # Comma-separated list of fields that that specify the order of the results. + # Default sorting order for a field is ascending. To specify descending order + # for a field, append a " desc" suffix. + # If not specified, the results will be returned in an unspecified order. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1beta::Workflow>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1beta::Workflow>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new + # + # # Call the list_workflows method. + # result = client.list_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::Workflows::V1beta::Workflow. + # p item + # end + # + def list_workflows request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_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::Workflows::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_workflows.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workflows.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.list_workflows request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workflows_stub, :list_workflows, "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 + + ## + # Gets details of a single Workflow. + # + # @overload get_workflow(request, options = nil) + # Pass arguments to `get_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::GetWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workflow(name: nil) + # Pass arguments to `get_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. Name of the workflow which information should be retrieved. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::V1beta::Workflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::V1beta::Workflow] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new + # + # # Call the get_workflow method. + # result = client.get_workflow request + # + # # The returned object is of type Google::Cloud::Workflows::V1beta::Workflow. + # p result + # + def get_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_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::Workflows::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_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.get_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 + + ## + # Creates a new workflow. If a workflow with the specified name already + # exists in the specified project and location, the long running operation + # will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + # + # @overload create_workflow(request, options = nil) + # Pass arguments to `create_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workflow(parent: nil, workflow: nil, workflow_id: nil) + # Pass arguments to `create_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. Project and location in which the workflow should be created. + # Format: projects/\\{project}/locations/\\{location} + # @param workflow [::Google::Cloud::Workflows::V1beta::Workflow, ::Hash] + # Required. Workflow to be created. + # @param workflow_id [::String] + # Required. The ID of the workflow to be created. It has to fulfill the + # following requirements: + # + # * Must contain only letters, numbers, underscores and hyphens. + # * Must start with a letter. + # * Must be between 1-64 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project and 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/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new + # + # # Call the create_workflow method. + # result = client.create_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest + + # Converts hash and nil to an 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_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::Workflows::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_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.create_workflow request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workflow with the specified name. + # This method also cancels and deletes all running executions of the + # workflow. + # + # @overload delete_workflow(request, options = nil) + # Pass arguments to `delete_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workflow(name: nil) + # Pass arguments to `delete_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. Name of the workflow to be deleted. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new + # + # # Call the delete_workflow method. + # result = client.delete_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_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::Workflows::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_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.delete_workflow request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workflow. + # Running this method has no impact on already running executions of the + # workflow. A new revision of the workflow may be created as a result of a + # successful update operation. In that case, such revision will be used + # in new workflow executions. + # + # @overload update_workflow(request, options = nil) + # Pass arguments to `update_workflow` via a request object, either of type + # {::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workflow(workflow: nil, update_mask: nil) + # Pass arguments to `update_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 workflow [::Google::Cloud::Workflows::V1beta::Workflow, ::Hash] + # Required. Workflow to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # List of fields to be updated. If not present, the entire workflow + # will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workflows/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new + # + # # Call the update_workflow method. + # result = client.update_workflow request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workflow request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_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::Workflows::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workflow.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workflow.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workflows_stub.update_workflow request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 Workflows REST API. + # + # This class represents the configuration for Workflows 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::Workflows::V1beta::Workflows::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_workflows to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_workflows.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_workflows.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflows.googleapis.com" + + config_attr :endpoint, nil, ::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 Workflows API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_workflows` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workflows + ## + # RPC-specific configuration for `get_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workflow + ## + # RPC-specific configuration for `create_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workflow + ## + # RPC-specific configuration for `delete_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workflow + ## + # RPC-specific configuration for `update_workflow` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workflow + + # @private + def initialize parent_rpcs = nil + list_workflows_config = parent_rpcs.list_workflows if parent_rpcs.respond_to? :list_workflows + @list_workflows = ::Gapic::Config::Method.new list_workflows_config + get_workflow_config = parent_rpcs.get_workflow if parent_rpcs.respond_to? :get_workflow + @get_workflow = ::Gapic::Config::Method.new get_workflow_config + create_workflow_config = parent_rpcs.create_workflow if parent_rpcs.respond_to? :create_workflow + @create_workflow = ::Gapic::Config::Method.new create_workflow_config + delete_workflow_config = parent_rpcs.delete_workflow if parent_rpcs.respond_to? :delete_workflow + @delete_workflow = ::Gapic::Config::Method.new delete_workflow_config + update_workflow_config = parent_rpcs.update_workflow if parent_rpcs.respond_to? :update_workflow + @update_workflow = ::Gapic::Config::Method.new update_workflow_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb new file mode 100644 index 000000000000..f7964defcdb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Workflows + module V1beta + module Workflows + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Workflows 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 Workflows 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::Workflows::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::Workflows::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::Workflows::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::Workflows::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workflows.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/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: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb new file mode 100644 index 000000000000..2b77bde101f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/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/workflows/v1beta/workflows_pb" + +module Google + module Cloud + module Workflows + module V1beta + module Workflows + module Rest + ## + # REST service stub for the Workflows 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_workflows REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse] + # A result object deserialized from the server's reply + def list_workflows request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_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_workflows", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workflows::V1beta::Workflow] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workflows::V1beta::Workflow] + # A result object deserialized from the server's reply + def get_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_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_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workflows::V1beta::Workflow.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_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_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_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workflow request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_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: "update_workflow", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + 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_workflows REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workflows_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/workflows", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest] + # 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_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/workflows", + body: "workflow", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workflow REST call + # + # @param request_pb [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workflow_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{workflow.name}", + body: "workflow", + matches: [ + ["workflow.name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb new file mode 100644 index 000000000000..3f5d16f5f421 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/workflows/v1beta/workflows.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/workflows/v1beta/workflows.proto\x12\x1dgoogle.cloud.workflows.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 google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x04\n\x08Workflow\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32-.google.cloud.workflows.v1beta.Workflow.StateB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x08 \x03(\x0b\x32\x33.google.cloud.workflows.v1beta.Workflow.LabelsEntry\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12\x19\n\x0fsource_contents\x18\n \x01(\tH\x00\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01:d\xea\x41\x61\n!workflows.googleapis.com/Workflow\x12\n\x08workflow\x18\x02 \x01(\x0b\x32\'.google.cloud.workflows.v1beta.WorkflowB\x03\xe0\x41\x02\x12\x18\n\x0bworkflow_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"P\n\x15\x44\x65leteWorkflowRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\"\x88\x01\n\x15UpdateWorkflowRequest\x12>\n\x08workflow\x18\x01 \x01(\x0b\x32\'.google.cloud.workflows.v1beta.WorkflowB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa5\x01\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x05 \x01(\t2\xf9\x08\n\tWorkflows\x12\xbe\x01\n\rListWorkflows\x12\x33.google.cloud.workflows.v1beta.ListWorkflowsRequest\x1a\x34.google.cloud.workflows.v1beta.ListWorkflowsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1beta/{parent=projects/*/locations/*}/workflows\x12\xab\x01\n\x0bGetWorkflow\x12\x31.google.cloud.workflows.v1beta.GetWorkflowRequest\x1a\'.google.cloud.workflows.v1beta.Workflow\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1beta/{name=projects/*/locations/*/workflows/*}\x12\xe9\x01\n\x0e\x43reateWorkflow\x12\x34.google.cloud.workflows.v1beta.CreateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\xda\x41\x1bparent,workflow,workflow_id\x82\xd3\xe4\x93\x02=\"1/v1beta/{parent=projects/*/locations/*}/workflows:\x08workflow\x12\xd4\x01\n\x0e\x44\x65leteWorkflow\x12\x34.google.cloud.workflows.v1beta.DeleteWorkflowRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1beta/{name=projects/*/locations/*/workflows/*}\x12\xeb\x01\n\x0eUpdateWorkflow\x12\x34.google.cloud.workflows.v1beta.UpdateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\xda\x41\x14workflow,update_mask\x82\xd3\xe4\x93\x02\x46\x32:/v1beta/{workflow.name=projects/*/locations/*/workflows/*}:\x08workflow\x1aL\xca\x41\x18workflows.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBv\n!com.google.cloud.workflows.v1betaB\x0eWorkflowsProtoP\x01Z?cloud.google.com/go/workflows/apiv1beta/workflowspb;workflowspbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Workflows + module V1beta + Workflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.Workflow").msgclass + Workflow::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.Workflow.State").enummodule + ListWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.ListWorkflowsRequest").msgclass + ListWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.ListWorkflowsResponse").msgclass + GetWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.GetWorkflowRequest").msgclass + CreateWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.CreateWorkflowRequest").msgclass + DeleteWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.DeleteWorkflowRequest").msgclass + UpdateWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.UpdateWorkflowRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb new file mode 100644 index 000000000000..c6606ec7ea91 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb @@ -0,0 +1,64 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/workflows/v1beta/workflows.proto for package 'google.cloud.workflows.v1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/workflows/v1beta/workflows_pb' + +module Google + module Cloud + module Workflows + module V1beta + module Workflows + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.workflows.v1beta.Workflows' + + # Lists Workflows in a given project and location. + # The default order is not specified. + rpc :ListWorkflows, ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest, ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse + # Gets details of a single Workflow. + rpc :GetWorkflow, ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest, ::Google::Cloud::Workflows::V1beta::Workflow + # Creates a new workflow. If a workflow with the specified name already + # exists in the specified project and location, the long running operation + # will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. + rpc :CreateWorkflow, ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest, ::Google::Longrunning::Operation + # Deletes a workflow with the specified name. + # This method also cancels and deletes all running executions of the + # workflow. + rpc :DeleteWorkflow, ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest, ::Google::Longrunning::Operation + # Updates an existing workflow. + # Running this method has no impact on already running executions of the + # workflow. A new revision of the workflow may be created as a result of a + # successful update operation. In that case, such revision will be used + # in new workflow executions. + rpc :UpdateWorkflow, ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..00492e17dd69 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Workflows 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-workflows-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb new file mode 100644 index 000000000000..51dd7e8cb940 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb @@ -0,0 +1,245 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Workflows + module V1beta + # Workflow program to be executed by Workflows. + # @!attribute [rw] name + # @return [::String] + # The resource name of the workflow. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + # @!attribute [rw] description + # @return [::String] + # Description of the workflow provided by the user. + # Must be at most 1000 unicode characters long. + # @!attribute [r] state + # @return [::Google::Cloud::Workflows::V1beta::Workflow::State] + # Output only. State of the workflow deployment. + # @!attribute [r] revision_id + # @return [::String] + # Output only. The revision of the workflow. + # A new revision of a workflow is created as a result of updating the + # following properties of a workflow: + # + # - {::Google::Cloud::Workflows::V1beta::Workflow#service_account Service account} + # - [Workflow code to be + # executed][google.cloud.workflows.v1beta.Workflow.source_contents] + # + # The format is "000001-a4d", where the first 6 characters define + # the zero-padded revision ordinal number. They are followed by a hyphen and + # 3 hexadecimal random characters. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of when the workflow was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of the workflow. + # @!attribute [r] revision_create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp that the latest revision of the workflow + # was created. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with this workflow. + # Labels can contain at most 64 entries. Keys and values can be no longer + # than 63 characters and can only contain lowercase letters, numeric + # characters, underscores and dashes. Label keys must start with a letter. + # International characters are allowed. + # @!attribute [rw] service_account + # @return [::String] + # The service account associated with the latest workflow version. + # This service account represents the identity of the workflow and determines + # what permissions the workflow has. + # Format: projects/\\{project}/serviceAccounts/\\{account} or \\{account} + # + # Using `-` as a wildcard for the `{project}` or not providing one at all + # will infer the project from the account. The `{account}` value can be the + # `email` address or the `unique_id` of the service account. + # + # If not provided, workflow will use the project's default service account. + # Modifying this field for an existing workflow results in a new workflow + # revision. + # @!attribute [rw] source_contents + # @return [::String] + # Workflow code to be executed. The size limit is 128KB. + class Workflow + 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 + + # Describes the current state of workflow deployment. More states may be + # added in the future. + module State + # Invalid state. + STATE_UNSPECIFIED = 0 + + # The workflow has been deployed successfully and is serving. + ACTIVE = 1 + end + end + + # Request for the + # {::Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows ListWorkflows} + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location from which the workflows should be listed. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of workflows to return per call. The service may return + # fewer than this value. If the value is not specified, a default value of + # 500 will be used. The maximum permitted value is 1000 and values greater + # than 1000 will be coerced down to 1000. + # @!attribute [rw] page_token + # @return [::String] + # A page token, received from a previous `ListWorkflows` call. + # Provide this to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListWorkflows` must + # match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Filter to restrict results to specific workflows. + # @!attribute [rw] order_by + # @return [::String] + # Comma-separated list of fields that that specify the order of the results. + # Default sorting order for a field is ascending. To specify descending order + # for a field, append a " desc" suffix. + # If not specified, the results will be returned in an unspecified order. + class ListWorkflowsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the + # {::Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows ListWorkflows} + # method. + # @!attribute [rw] workflows + # @return [::Array<::Google::Cloud::Workflows::V1beta::Workflow>] + # The workflows which match the request. + # @!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>] + # Unreachable resources. + class ListWorkflowsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::V1beta::Workflows::Client#get_workflow GetWorkflow} method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workflow which information should be retrieved. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + class GetWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::V1beta::Workflows::Client#create_workflow CreateWorkflow} + # method. + # @!attribute [rw] parent + # @return [::String] + # Required. Project and location in which the workflow should be created. + # Format: projects/\\{project}/locations/\\{location} + # @!attribute [rw] workflow + # @return [::Google::Cloud::Workflows::V1beta::Workflow] + # Required. Workflow to be created. + # @!attribute [rw] workflow_id + # @return [::String] + # Required. The ID of the workflow to be created. It has to fulfill the + # following requirements: + # + # * Must contain only letters, numbers, underscores and hyphens. + # * Must start with a letter. + # * Must be between 1-64 characters. + # * Must end with a number or a letter. + # * Must be unique within the customer project and location. + class CreateWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::V1beta::Workflows::Client#delete_workflow DeleteWorkflow} + # method. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workflow to be deleted. + # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} + class DeleteWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the + # {::Google::Cloud::Workflows::V1beta::Workflows::Client#update_workflow UpdateWorkflow} + # method. + # @!attribute [rw] workflow + # @return [::Google::Cloud::Workflows::V1beta::Workflow] + # Required. Workflow to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # List of fields to be updated. If not present, the entire workflow + # will be updated. + class UpdateWorkflowRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation finished running. + # @!attribute [rw] target + # @return [::String] + # Server-defined resource path for the target of the operation. + # @!attribute [rw] verb + # @return [::String] + # Name of the verb executed by the operation. + # @!attribute [rw] api_version + # @return [::String] + # 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-workflows-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..6d0b5707d9d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta", path: "../" +else + gem "google-cloud-workflows-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-workflows-v1beta/snippets/snippet_metadata_google.cloud.workflows.v1beta.json b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/snippet_metadata_google.cloud.workflows.v1beta.json new file mode 100644 index 000000000000..aa4ec480902e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/snippet_metadata_google.cloud.workflows.v1beta.json @@ -0,0 +1,215 @@ +{ + "client_library": { + "name": "google-cloud-workflows-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.workflows.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "workflows_v1beta_generated_Workflows_ListWorkflows_sync", + "title": "Snippet for the list_workflows call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows.", + "file": "workflows/list_workflows.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workflows", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" + }, + "method": { + "short_name": "ListWorkflows", + "full_name": "google.cloud.workflows.v1beta.Workflows.ListWorkflows", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1beta.Workflows" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflows_v1beta_generated_Workflows_GetWorkflow_sync", + "title": "Snippet for the get_workflow call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#get_workflow.", + "file": "workflows/get_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workflow", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#get_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1beta::GetWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workflows::V1beta::Workflow", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" + }, + "method": { + "short_name": "GetWorkflow", + "full_name": "google.cloud.workflows.v1beta.Workflows.GetWorkflow", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1beta.Workflows" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflows_v1beta_generated_Workflows_CreateWorkflow_sync", + "title": "Snippet for the create_workflow call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#create_workflow.", + "file": "workflows/create_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workflow", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#create_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" + }, + "method": { + "short_name": "CreateWorkflow", + "full_name": "google.cloud.workflows.v1beta.Workflows.CreateWorkflow", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1beta.Workflows" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflows_v1beta_generated_Workflows_DeleteWorkflow_sync", + "title": "Snippet for the delete_workflow call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#delete_workflow.", + "file": "workflows/delete_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workflow", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#delete_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" + }, + "method": { + "short_name": "DeleteWorkflow", + "full_name": "google.cloud.workflows.v1beta.Workflows.DeleteWorkflow", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1beta.Workflows" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workflows_v1beta_generated_Workflows_UpdateWorkflow_sync", + "title": "Snippet for the update_workflow call in the Workflows service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#update_workflow.", + "file": "workflows/update_workflow.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workflow", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#update_workflow", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workflows::Client", + "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" + }, + "method": { + "short_name": "UpdateWorkflow", + "full_name": "google.cloud.workflows.v1beta.Workflows.UpdateWorkflow", + "service": { + "short_name": "Workflows", + "full_name": "google.cloud.workflows.v1beta.Workflows" + } + } + }, + "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-workflows-v1beta/snippets/workflows/create_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb new file mode 100644 index 000000000000..8b8c1e929159 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflows_v1beta_generated_Workflows_CreateWorkflow_sync] +require "google/cloud/workflows/v1beta" + +## +# Snippet for the create_workflow call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1beta::Workflows::Client#create_workflow. +# +def create_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new + + # Call the create_workflow method. + result = client.create_workflow request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workflows_v1beta_generated_Workflows_CreateWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb new file mode 100644 index 000000000000..95eaf09e0e6f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflows_v1beta_generated_Workflows_DeleteWorkflow_sync] +require "google/cloud/workflows/v1beta" + +## +# Snippet for the delete_workflow call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1beta::Workflows::Client#delete_workflow. +# +def delete_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new + + # Call the delete_workflow method. + result = client.delete_workflow request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workflows_v1beta_generated_Workflows_DeleteWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb new file mode 100644 index 000000000000..8d629d661011 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/get_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 workflows_v1beta_generated_Workflows_GetWorkflow_sync] +require "google/cloud/workflows/v1beta" + +## +# Snippet for the get_workflow call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1beta::Workflows::Client#get_workflow. +# +def get_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new + + # Call the get_workflow method. + result = client.get_workflow request + + # The returned object is of type Google::Cloud::Workflows::V1beta::Workflow. + p result +end +# [END workflows_v1beta_generated_Workflows_GetWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb new file mode 100644 index 000000000000..0ed09a7616d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/list_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 workflows_v1beta_generated_Workflows_ListWorkflows_sync] +require "google/cloud/workflows/v1beta" + +## +# Snippet for the list_workflows call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows. +# +def list_workflows + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new + + # Call the list_workflows method. + result = client.list_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::Workflows::V1beta::Workflow. + p item + end +end +# [END workflows_v1beta_generated_Workflows_ListWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb new file mode 100644 index 000000000000..bab5a8ac4c65 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workflows_v1beta_generated_Workflows_UpdateWorkflow_sync] +require "google/cloud/workflows/v1beta" + +## +# Snippet for the update_workflow call in the Workflows service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workflows::V1beta::Workflows::Client#update_workflow. +# +def update_workflow + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workflows::V1beta::Workflows::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new + + # Call the update_workflow method. + result = client.update_workflow request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workflows_v1beta_generated_Workflows_UpdateWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb new file mode 100644 index 000000000000..7056811966a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_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/workflows/v1beta/workflows_pb" +require "google/cloud/workflows/v1beta/workflows_services_pb" +require "google/cloud/workflows/v1beta/workflows" + +class ::Google::Cloud::Workflows::V1beta::Workflows::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb new file mode 100644 index 000000000000..79297ed7cc4c --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_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/workflows/v1beta/workflows" + +class ::Google::Cloud::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::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_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::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.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-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb new file mode 100644 index 000000000000..b88805f29aeb --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_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/workflows/v1beta/workflows_pb" +require "google/cloud/workflows/v1beta/workflows/rest" + + +class ::Google::Cloud::Workflows::V1beta::Workflows::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_workflows + # Create test objects. + client_result = ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse.new + http_response = OpenStruct.new 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_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_list_workflows_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workflows_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workflows parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workflows ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workflows(::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.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_workflows_client_stub.call_count + end + end + end + + def test_get_workflow + # Create test objects. + client_result = ::Google::Cloud::Workflows::V1beta::Workflow.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_get_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workflow ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workflow(::Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workflow_client_stub.call_count + end + end + end + + def test_create_workflow + # Create test objects. + 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" + workflow = {} + workflow_id = "hello world" + + create_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_create_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workflow ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workflow(::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workflow_client_stub.call_count + end + end + end + + def test_delete_workflow + # Create test objects. + 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_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_delete_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workflow({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workflow name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workflow ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workflow({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workflow(::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workflow_client_stub.call_count + end + end + end + + def test_update_workflow + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workflow = {} + update_mask = {} + + update_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_update_workflow_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workflow ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workflow({ workflow: workflow, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workflow(::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workflow_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::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb new file mode 100644 index 000000000000..b92f9a575774 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb @@ -0,0 +1,442 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/workflows/v1beta/workflows_pb" +require "google/cloud/workflows/v1beta/workflows" + +class ::Google::Cloud::Workflows::V1beta::Workflows::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_workflows + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workflows, name + assert_kind_of ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest, 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_workflows_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workflows parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workflows ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workflows(::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.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_workflows_client_stub.call_rpc_count + end + end + + def test_get_workflow + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workflows::V1beta::Workflow.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workflow, name + assert_kind_of ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workflow({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workflow name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workflow ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workflow({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workflow(::Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workflow_client_stub.call_rpc_count + end + end + + def test_create_workflow + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workflow = {} + workflow_id = "hello world" + + create_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workflow, name + assert_kind_of ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::V1beta::Workflow), request["workflow"] + assert_equal "hello world", request["workflow_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workflow ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workflow(::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_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_workflow_client_stub.call_rpc_count + end + end + + def test_delete_workflow + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workflow, name + assert_kind_of ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workflow({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workflow name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workflow ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workflow({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workflow(::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.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_workflow_client_stub.call_rpc_count + end + end + + def test_update_workflow + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workflow = {} + update_mask = {} + + update_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workflow, name + assert_kind_of ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::V1beta::Workflow), request["workflow"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workflow_client_stub do + # Create client + client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workflow({ workflow: workflow, update_mask: update_mask }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_workflow workflow: workflow, update_mask: update_mask do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_workflow ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_workflow({ workflow: workflow, update_mask: update_mask }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_workflow(::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new(workflow: workflow, 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_workflow_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::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Workflows::V1beta::Workflows::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.gitignore b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.repo-metadata.json new file mode 100644 index 000000000000..6f86f03223ce --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "workflowexecutions.googleapis.com", + "api_shortname": "workflowexecutions", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions/latest", + "distribution_name": "google-cloud-workflows-executions", + "is_cloud": true, + "language": "ruby", + "name": "workflowexecutions", + "name_pretty": "Workflows Executions API", + "product_documentation": "https://cloud.google.com/workflows/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.", + "ruby-cloud-env-prefix": "WORKFLOWS", + "ruby-cloud-product-url": "https://cloud.google.com/workflows/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.rubocop.yml b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.rubocop.yml new file mode 100644 index 000000000000..903242f65cea --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workflows-executions.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-cloud-workflows-executions.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.toys.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.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-workflows/google-cloud-workflows-executions/.yardopts b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.yardopts new file mode 100644 index 000000000000..d07738816489 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Workflows Executions API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/AUTHENTICATION.md new file mode 100644 index 000000000000..185bed90df18 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workflows-executions 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-workflows-executions 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/workflows/executions" + +client = Google::Cloud::Workflows::Executions.executions do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workflows/executions" + +Google::Cloud::Workflows::Executions.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Workflows::Executions.executions +``` + +### 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-workflows-executions +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/workflows/executions" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Workflows::Executions.executions +``` + +### 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-workflows/google-cloud-workflows-executions/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Gemfile b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Gemfile new file mode 100644 index 000000000000..90ad7598b189 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-workflows-executions-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-workflows-executions.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/LICENSE.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/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-workflows/google-cloud-workflows-executions/README.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/README.md new file mode 100644 index 000000000000..f3b71237b9d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Workflows Executions API + +API Client library for the Workflows Executions API + +Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-workflows-executions-v*`. +The gem `google-cloud-workflows-executions` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions/latest) +for this library, google-cloud-workflows-executions, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-workflows-executions-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/workflows/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-workflows-executions +``` + +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/workflowexecutions.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/workflows/executions" + +client = Google::Cloud::Workflows::Executions.executions +request = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new # (request fields as keyword arguments...) +response = client.list_executions request +``` + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-workflows-executions-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workflows-executions`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workflows-executions-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-workflows-executions`. +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-workflows-executions-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-workflows/google-cloud-workflows-executions/Rakefile b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Rakefile new file mode 100644 index 000000000000..5c9ac364bc2a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-workflows-executions acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WORKFLOWS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WORKFLOWS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/workflows/executions/v1/executions/credentials" + ::Google::Cloud::Workflows::Executions::V1::Executions::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WORKFLOWS_PROJECT"] = project + ENV["WORKFLOWS_TEST_PROJECT"] = project + ENV["WORKFLOWS_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-workflows-executions 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-workflows-executions 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-workflows-executions 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-workflows-executions gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workflows-executions" + header "google-cloud-workflows-executions rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workflows-executions yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workflows-executions 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-workflows-executions 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-workflows-executions 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-workflows/google-cloud-workflows-executions/google-cloud-workflows-executions.gemspec b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/google-cloud-workflows-executions.gemspec new file mode 100644 index 000000000000..412cb0c6ff5f --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/google-cloud-workflows-executions.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workflows/executions/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workflows-executions" + gem.version = Google::Cloud::Workflows::Executions::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero." + gem.summary = "API Client library for the Workflows Executions API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-workflows-executions-v1", "~> 1.2" +end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google-cloud-workflows-executions.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google-cloud-workflows-executions.rb new file mode 100644 index 000000000000..13c530a8e067 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google-cloud-workflows-executions.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workflows/executions" unless defined? Google::Cloud::Workflows::Executions::VERSION diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions.rb new file mode 100644 index 000000000000..f5c8e2a49537 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions.rb @@ -0,0 +1,150 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/workflows/executions/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :workflows_executions do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Workflows + module Executions + ## + # Create a new client object for Executions. + # + # By default, this returns an instance of + # [Google::Cloud::Workflows::Executions::V1::Executions::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest/Google-Cloud-Workflows-Executions-V1-Executions-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Executions service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the Executions service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Workflows::Executions.executions_available?}. + # + # ## About Executions + # + # Executions is used to start and manage running instances of + # [Workflows][google.cloud.workflows.v1.Workflow] called executions. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [::Object] A client object for the specified version. + # + def self.executions version: :v1, &block + require "google/cloud/workflows/executions/#{version.to_s.downcase}" + + package_name = Google::Cloud::Workflows::Executions + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Workflows::Executions.const_get(package_name).const_get(:Executions) + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Executions service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Workflows::Executions.executions}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Executions service, + # or if the versioned client gem needs an update to support the Executions service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @return [boolean] Whether the service is available. + # + def self.executions_available? version: :v1 + require "google/cloud/workflows/executions/#{version.to_s.downcase}" + package_name = Google::Cloud::Workflows::Executions + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Workflows::Executions.const_get package_name + return false unless service_module.const_defined? :Executions + service_module = service_module.const_get :Executions + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-workflows-executions library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.workflows_executions if block_given? + + ::Google::Cloud.configure.workflows_executions + end + end + end + end +end + +helper_path = ::File.join __dir__, "executions", "helpers.rb" +require "google/cloud/workflows/executions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions/version.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions/version.rb new file mode 100644 index 000000000000..c22a678f1256 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions/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 Workflows + module Executions + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/client_test.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/client_test.rb new file mode 100644 index 000000000000..0a97f964751a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/client_test.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/workflows/executions" +require "gapic/common" +require "gapic/grpc" + +class Google::Cloud::Workflows::Executions::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_executions_grpc + skip unless Google::Cloud::Workflows::Executions.executions_available? + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Workflows::Executions.executions do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Workflows::Executions::V1::Executions::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/version_test.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/version_test.rb new file mode 100644 index 000000000000..128c4ab2b101 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/workflows/executions/version" + +class Google::Cloud::Workflows::Executions::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Workflows::Executions::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/helper.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.gitignore b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.repo-metadata.json new file mode 100644 index 000000000000..d25673438688 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "workflows.googleapis.com", + "api_shortname": "workflows", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows/latest", + "distribution_name": "google-cloud-workflows", + "is_cloud": true, + "language": "ruby", + "name": "workflows", + "name_pretty": "Workflows API", + "product_documentation": "https://cloud.google.com/workflows/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.", + "ruby-cloud-env-prefix": "WORKFLOWS", + "ruby-cloud-product-url": "https://cloud.google.com/workflows/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.rubocop.yml b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.rubocop.yml new file mode 100644 index 000000000000..e82312dde04e --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workflows.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-cloud-workflows.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.toys.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.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-workflows/google-cloud-workflows/.yardopts b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.yardopts new file mode 100644 index 000000000000..88d4652bb1ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Workflows API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/AUTHENTICATION.md new file mode 100644 index 000000000000..31c743cfb7ed --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workflows 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-workflows 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/workflows" + +client = Google::Cloud::Workflows.workflows do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workflows" + +Google::Cloud::Workflows.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Workflows.workflows +``` + +### 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-workflows +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/workflows" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Workflows.workflows +``` + +### 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-workflows/google-cloud-workflows/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Gemfile b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Gemfile new file mode 100644 index 000000000000..57a61b552e9a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-workflows-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-workflows.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/LICENSE.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/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-workflows/google-cloud-workflows/README.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/README.md new file mode 100644 index 000000000000..d0cb1aef1d2a --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Workflows API + +API Client library for the Workflows API + +Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-workflows-v*`. +The gem `google-cloud-workflows` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows/latest) +for this library, google-cloud-workflows, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-workflows-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/workflows/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-workflows +``` + +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/workflows.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/workflows" + +client = Google::Cloud::Workflows.workflows +request = ::Google::Cloud::Workflows::V1::ListWorkflowsRequest.new # (request fields as keyword arguments...) +response = client.list_workflows request +``` + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-workflows-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workflows`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workflows-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-workflows`. +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-workflows-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-workflows/google-cloud-workflows/Rakefile b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Rakefile new file mode 100644 index 000000000000..c99eee2c3b08 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-workflows acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["WORKFLOWS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["WORKFLOWS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/workflows/v1/workflows/credentials" + ::Google::Cloud::Workflows::V1::Workflows::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["WORKFLOWS_PROJECT"] = project + ENV["WORKFLOWS_TEST_PROJECT"] = project + ENV["WORKFLOWS_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-workflows 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-workflows 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-workflows 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-workflows gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workflows" + header "google-cloud-workflows rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workflows yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workflows 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-workflows 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-workflows 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-workflows/google-cloud-workflows/google-cloud-workflows.gemspec b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/google-cloud-workflows.gemspec new file mode 100644 index 000000000000..8c487d94c4d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/google-cloud-workflows.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workflows/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workflows" + gem.version = Google::Cloud::Workflows::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero." + gem.summary = "API Client library for the Workflows API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-workflows-v1", "~> 2.0" +end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google-cloud-workflows.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google-cloud-workflows.rb new file mode 100644 index 000000000000..adabd9392337 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google-cloud-workflows.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workflows" unless defined? Google::Cloud::Workflows::VERSION diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows.rb new file mode 100644 index 000000000000..33e14a2ff7c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows.rb @@ -0,0 +1,158 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/workflows/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :workflows do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Workflows + ## + # Create a new client object for Workflows. + # + # By default, this returns an instance of + # [Google::Cloud::Workflows::V1::Workflows::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest/Google-Cloud-Workflows-V1-Workflows-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Workflows service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Workflows service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Workflows.workflows_available?}. + # + # ## About Workflows + # + # Workflows is used to deploy and execute workflow programs. + # Workflows makes sure the program executes reliably, despite hardware and + # networking interruptions. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.workflows version: :v1, transport: :grpc, &block + require "google/cloud/workflows/#{version.to_s.downcase}" + + package_name = Google::Cloud::Workflows + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Workflows.const_get(package_name).const_get(:Workflows) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Workflows service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Workflows.workflows}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Workflows service, + # or if the versioned client gem needs an update to support the Workflows service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.workflows_available? version: :v1, transport: :grpc + require "google/cloud/workflows/#{version.to_s.downcase}" + package_name = Google::Cloud::Workflows + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Workflows.const_get package_name + return false unless service_module.const_defined? :Workflows + service_module = service_module.const_get :Workflows + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-workflows library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.workflows if block_given? + + ::Google::Cloud.configure.workflows + end + end + end +end + +helper_path = ::File.join __dir__, "workflows", "helpers.rb" +require "google/cloud/workflows/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows/version.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows/version.rb new file mode 100644 index 000000000000..cf67bb79b7d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Workflows + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/client_test.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/client_test.rb new file mode 100644 index 000000000000..e37935a25dde --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/workflows" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Workflows::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_workflows_grpc + skip unless Google::Cloud::Workflows.workflows_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Workflows.workflows transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Workflows::V1::Workflows::Client, client + end + end + + def test_workflows_rest + skip unless Google::Cloud::Workflows.workflows_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Workflows.workflows transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Workflows::V1::Workflows::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/version_test.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/version_test.rb new file mode 100644 index 000000000000..b7640f8afba5 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/workflows/version" + +class Google::Cloud::Workflows::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Workflows::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/helper.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1/.gitignore b/owl-bot-staging/google-cloud-workstations-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workstations-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-workstations-v1/.repo-metadata.json new file mode 100644 index 000000000000..45c35fe5368d --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "workstations.googleapis.com", + "api_shortname": "workstations", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest", + "distribution_name": "google-cloud-workstations-v1", + "is_cloud": true, + "language": "ruby", + "name": "workstations", + "name_pretty": "Cloud Workstations V1 API", + "product_documentation": "https://cloud.google.com/workstations/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Allows administrators to create managed developer environments in the cloud. Note that google-cloud-workstations-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workstations instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/workstations/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workstations-v1/.rubocop.yml b/owl-bot-staging/google-cloud-workstations-v1/.rubocop.yml new file mode 100644 index 000000000000..a44551c617b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workstations-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-workstations-v1.rb" diff --git a/owl-bot-staging/google-cloud-workstations-v1/.toys.rb b/owl-bot-staging/google-cloud-workstations-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/.yardopts b/owl-bot-staging/google-cloud-workstations-v1/.yardopts new file mode 100644 index 000000000000..2d5ddbfd78ca --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Workstations 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-workstations-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workstations-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..f69ad9397007 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workstations-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-workstations-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/workstations/v1" + +client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workstations/v1" + +::Google::Cloud::Workstations::V1::Workstations::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Workstations::V1::Workstations::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-workstations-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/workstations/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Workstations::V1::Workstations::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-workstations-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-workstations-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workstations-v1/Gemfile b/owl-bot-staging/google-cloud-workstations-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workstations-v1/LICENSE.md b/owl-bot-staging/google-cloud-workstations-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/README.md b/owl-bot-staging/google-cloud-workstations-v1/README.md new file mode 100644 index 000000000000..a82b29f2a4e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Workstations V1 API + +Allows administrators to create managed developer environments in the 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 Cloud Workstations V1 API. Most users should consider using +the main client gem, +[google-cloud-workstations](https://rubygems.org/gems/google-cloud-workstations). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-workstations-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/workstations.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/workstations/v1" + +client = ::Google::Cloud::Workstations::V1::Workstations::Client.new +request = ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new # (request fields as keyword arguments...) +response = client.get_workstation_cluster request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/workstations/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/workstations/v1" +require "logger" + +client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workstations`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workstations-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-workstations`. +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-workstations-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-workstations-v1/Rakefile b/owl-bot-staging/google-cloud-workstations-v1/Rakefile new file mode 100644 index 000000000000..2d6588091b1a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-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/workstations/v1/workstations/credentials" + ::Google::Cloud::Workstations::V1::Workstations::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-workstations-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-workstations-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-workstations-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-workstations-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workstations-v1" + header "google-cloud-workstations-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workstations-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workstations-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-workstations-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-workstations-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-workstations-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-workstations-v1/gapic_metadata.json new file mode 100644 index 000000000000..27954dcb3a8f --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/gapic_metadata.json @@ -0,0 +1,118 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.workstations.v1", + "libraryPackage": "::Google::Cloud::Workstations::V1", + "services": { + "Workstations": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Workstations::V1::Workstations::Client", + "rpcs": { + "GetWorkstationCluster": { + "methods": [ + "get_workstation_cluster" + ] + }, + "ListWorkstationClusters": { + "methods": [ + "list_workstation_clusters" + ] + }, + "CreateWorkstationCluster": { + "methods": [ + "create_workstation_cluster" + ] + }, + "UpdateWorkstationCluster": { + "methods": [ + "update_workstation_cluster" + ] + }, + "DeleteWorkstationCluster": { + "methods": [ + "delete_workstation_cluster" + ] + }, + "GetWorkstationConfig": { + "methods": [ + "get_workstation_config" + ] + }, + "ListWorkstationConfigs": { + "methods": [ + "list_workstation_configs" + ] + }, + "ListUsableWorkstationConfigs": { + "methods": [ + "list_usable_workstation_configs" + ] + }, + "CreateWorkstationConfig": { + "methods": [ + "create_workstation_config" + ] + }, + "UpdateWorkstationConfig": { + "methods": [ + "update_workstation_config" + ] + }, + "DeleteWorkstationConfig": { + "methods": [ + "delete_workstation_config" + ] + }, + "GetWorkstation": { + "methods": [ + "get_workstation" + ] + }, + "ListWorkstations": { + "methods": [ + "list_workstations" + ] + }, + "ListUsableWorkstations": { + "methods": [ + "list_usable_workstations" + ] + }, + "CreateWorkstation": { + "methods": [ + "create_workstation" + ] + }, + "UpdateWorkstation": { + "methods": [ + "update_workstation" + ] + }, + "DeleteWorkstation": { + "methods": [ + "delete_workstation" + ] + }, + "StartWorkstation": { + "methods": [ + "start_workstation" + ] + }, + "StopWorkstation": { + "methods": [ + "stop_workstation" + ] + }, + "GenerateAccessToken": { + "methods": [ + "generate_access_token" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-workstations-v1/google-cloud-workstations-v1.gemspec b/owl-bot-staging/google-cloud-workstations-v1/google-cloud-workstations-v1.gemspec new file mode 100644 index 000000000000..673b80c09ed4 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/google-cloud-workstations-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workstations/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workstations-v1" + gem.version = Google::Cloud::Workstations::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Allows administrators to create managed developer environments in the cloud. Note that google-cloud-workstations-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workstations instead. See the readme for more details." + gem.summary = "Allows administrators to create managed developer environments in the cloud." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb new file mode 100644 index 000000000000..5432da78d5cb --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google-cloud-workstations-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/workstations/v1" diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb new file mode 100644 index 000000000000..33d0c263a9f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/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/workstations/v1/workstations" +require "google/cloud/workstations/v1/version" + +module Google + module Cloud + module Workstations + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/workstations/v1" + # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/workstations/v1" + # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/workstations/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb new file mode 100644 index 000000000000..4e045e2c88f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module Workstations + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/workstations/v1/rest" + # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workstations"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, 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/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, 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/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb new file mode 100644 index 000000000000..4a1cec95dcc9 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/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/workstations/v1/workstations/rest" +require "google/cloud/workstations/v1/bindings_override" +require "google/cloud/workstations/v1/version" + +module Google + module Cloud + module Workstations + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/workstations/v1/rest" + # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb new file mode 100644 index 000000000000..fda56f15b199 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/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 Workstations + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb new file mode 100644 index 000000000000..08a4bda4af66 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.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/workstations/v1/version" + +require "google/cloud/workstations/v1/workstations/credentials" +require "google/cloud/workstations/v1/workstations/paths" +require "google/cloud/workstations/v1/workstations/operations" +require "google/cloud/workstations/v1/workstations/client" +require "google/cloud/workstations/v1/workstations/rest" + +module Google + module Cloud + module Workstations + module V1 + ## + # Service for interacting with Cloud Workstations. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/workstations/v1/workstations" + # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/workstations/v1/workstations/rest" + # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + module Workstations + end + end + end + end +end + +helper_path = ::File.join __dir__, "workstations", "helpers.rb" +require "google/cloud/workstations/v1/workstations/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb new file mode 100644 index 000000000000..0a8ab36092c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb @@ -0,0 +1,2595 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/workstations/v1/workstations_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Workstations + module V1 + module Workstations + ## + # Client for the Workstations service. + # + # Service for interacting with Cloud Workstations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workstations_stub + + ## + # Configure the Workstations Client class. + # + # See {::Google::Cloud::Workstations::V1::Workstations::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Workstations clients + # ::Google::Cloud::Workstations::V1::Workstations::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workstations", "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_workstation_cluster.timeout = 60.0 + default_config.rpcs.get_workstation_cluster.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstation_clusters.timeout = 60.0 + default_config.rpcs.list_workstation_clusters.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation_cluster.timeout = 60.0 + + default_config.rpcs.update_workstation_cluster.timeout = 60.0 + + default_config.rpcs.delete_workstation_cluster.timeout = 60.0 + + default_config.rpcs.get_workstation_config.timeout = 60.0 + default_config.rpcs.get_workstation_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstation_configs.timeout = 60.0 + default_config.rpcs.list_workstation_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_usable_workstation_configs.timeout = 60.0 + default_config.rpcs.list_usable_workstation_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation_config.timeout = 60.0 + + default_config.rpcs.update_workstation_config.timeout = 60.0 + + default_config.rpcs.delete_workstation_config.timeout = 60.0 + + default_config.rpcs.get_workstation.timeout = 60.0 + default_config.rpcs.get_workstation.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstations.timeout = 60.0 + default_config.rpcs.list_workstations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_usable_workstations.timeout = 60.0 + default_config.rpcs.list_usable_workstations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation.timeout = 60.0 + + default_config.rpcs.update_workstation.timeout = 60.0 + + default_config.rpcs.delete_workstation.timeout = 60.0 + + default_config.rpcs.start_workstation.timeout = 60.0 + + default_config.rpcs.stop_workstation.timeout = 60.0 + + default_config.rpcs.generate_access_token.timeout = 60.0 + default_config.rpcs.generate_access_token.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 Workstations Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workstations::V1::Workstations::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @workstations_stub.universe_domain + end + + ## + # Create a new Workstations client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Workstations 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/workstations/v1/workstations_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 + + @workstations_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Workstations::V1::Workstations::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 + ) + + @workstations_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 = @workstations_stub.endpoint + config.universe_domain = @workstations_stub.universe_domain + config.logger = @workstations_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 = @workstations_stub.endpoint + config.universe_domain = @workstations_stub.universe_domain + config.logger = @workstations_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Workstations::V1::Workstations::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 + @workstations_stub.logger + end + + # Service calls + + ## + # Returns the requested workstation cluster. + # + # @overload get_workstation_cluster(request, options = nil) + # Pass arguments to `get_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workstation_cluster(name: nil) + # Pass arguments to `get_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workstations::V1::WorkstationCluster] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new + # + # # Call the get_workstation_cluster method. + # result = client.get_workstation_cluster request + # + # # The returned object is of type Google::Cloud::Workstations::V1::WorkstationCluster. + # p result + # + def get_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_workstation_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :get_workstation_cluster, request, 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 all workstation clusters in the specified location. + # + # @overload list_workstation_clusters(request, options = nil) + # Pass arguments to `list_workstation_clusters` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workstation_clusters(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstation_clusters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::WorkstationCluster>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationCluster>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new + # + # # Call the list_workstation_clusters method. + # result = client.list_workstation_clusters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1::WorkstationCluster. + # p item + # end + # + def list_workstation_clusters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workstation_clusters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workstation_clusters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workstation_clusters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_workstation_clusters, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_clusters, request, response, 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 workstation cluster. + # + # @overload create_workstation_cluster(request, options = nil) + # Pass arguments to `create_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) + # Pass arguments to `create_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param workstation_cluster_id [::String] + # Required. ID to use for the workstation cluster. + # @param workstation_cluster [::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash] + # Required. Workstation cluster to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new + # + # # Call the create_workstation_cluster method. + # result = client.create_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_workstation_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :create_workstation_cluster, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 workstation cluster. + # + # @overload update_workstation_cluster(request, options = nil) + # Pass arguments to `update_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workstation_cluster [::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash] + # Required. Workstation cluster to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask that specifies which fields in the workstation cluster + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set, and the workstation cluster is not found, a new + # workstation cluster will be created. In this situation, update_mask is + # ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new + # + # # Call the update_workstation_cluster method. + # result = client.update_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.workstation_cluster&.name + header_params["workstation_cluster.name"] = request.workstation_cluster.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_workstation_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :update_workstation_cluster, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified workstation cluster. + # + # @overload delete_workstation_cluster(request, options = nil) + # Pass arguments to `delete_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation cluster to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation cluster on the server does not have this ETag. + # @param force [::Boolean] + # Optional. If set, any workstation configurations and workstations in the + # workstation cluster are also deleted. Otherwise, the request only + # works if the workstation cluster has no configurations or workstations. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new + # + # # Call the delete_workstation_cluster method. + # result = client.delete_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_workstation_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :delete_workstation_cluster, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested workstation configuration. + # + # @overload get_workstation_config(request, options = nil) + # Pass arguments to `get_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workstation_config(name: nil) + # Pass arguments to `get_workstation_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 requested resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workstations::V1::WorkstationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new + # + # # Call the get_workstation_config method. + # result = client.get_workstation_config request + # + # # The returned object is of type Google::Cloud::Workstations::V1::WorkstationConfig. + # p result + # + def get_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workstation_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_workstation_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :get_workstation_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 all workstation configurations in the specified cluster. + # + # @overload list_workstation_configs(request, options = nil) + # Pass arguments to `list_workstation_configs` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workstation_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstation_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. Parent resource name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::WorkstationConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new + # + # # Call the list_workstation_configs method. + # result = client.list_workstation_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::Workstations::V1::WorkstationConfig. + # p item + # end + # + def list_workstation_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workstation_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workstation_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workstation_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_workstation_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all workstation configurations in the specified cluster on which + # the caller has the "workstations.workstation.create" permission. + # + # @overload list_usable_workstation_configs(request, options = nil) + # Pass arguments to `list_usable_workstation_configs` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_usable_workstation_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. Parent resource name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::WorkstationConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new + # + # # Call the list_usable_workstation_configs method. + # result = client.list_usable_workstation_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::Workstations::V1::WorkstationConfig. + # p item + # end + # + def list_usable_workstation_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_usable_workstation_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_usable_workstation_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_usable_workstation_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_usable_workstation_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstation_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 a new workstation configuration. + # + # @overload create_workstation_config(request, options = nil) + # Pass arguments to `create_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) + # Pass arguments to `create_workstation_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. Parent resource name. + # @param workstation_config_id [::String] + # Required. ID to use for the workstation configuration. + # @param workstation_config [::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash] + # Required. Config to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new + # + # # Call the create_workstation_config method. + # result = client.create_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_workstation_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_workstation_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :create_workstation_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing workstation configuration. + # + # @overload update_workstation_config(request, options = nil) + # Pass arguments to `update_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation_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 workstation_config [::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash] + # Required. Config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration will be created. In this situation, + # update_mask is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new + # + # # Call the update_workstation_config method. + # result = client.update_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_workstation_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.workstation_config&.name + header_params["workstation_config.name"] = request.workstation_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_workstation_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :update_workstation_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified workstation configuration. + # + # @overload delete_workstation_config(request, options = nil) + # Pass arguments to `delete_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_workstation_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 workstation configuration to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request is rejected if the latest version of the + # workstation configuration on the server does not have this ETag. + # @param force [::Boolean] + # Optional. If set, any workstations in the workstation configuration are + # also deleted. Otherwise, the request works only if the workstation + # configuration has no workstations. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new + # + # # Call the delete_workstation_config method. + # result = client.delete_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_workstation_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_workstation_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :delete_workstation_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested workstation. + # + # @overload get_workstation(request, options = nil) + # Pass arguments to `get_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::GetWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::GetWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workstation(name: nil) + # Pass arguments to `get_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workstations::V1::Workstation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workstations::V1::Workstation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::GetWorkstationRequest.new + # + # # Call the get_workstation method. + # result = client.get_workstation request + # + # # The returned object is of type Google::Cloud::Workstations::V1::Workstation. + # p result + # + def get_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.get_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :get_workstation, request, 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 all Workstations using the specified workstation configuration. + # + # @overload list_workstations(request, options = nil) + # Pass arguments to `list_workstations` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListWorkstationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListWorkstationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workstations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::Workstation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::Workstation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListWorkstationsRequest.new + # + # # Call the list_workstations method. + # result = client.list_workstations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. + # p item + # end + # + def list_workstations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workstations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_workstations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workstations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_workstations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstations, request, response, 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 all workstations using the specified workstation configuration + # on which the caller has the "workstations.workstations.use" permission. + # + # @overload list_usable_workstations(request, options = nil) + # Pass arguments to `list_usable_workstations` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_usable_workstations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_usable_workstations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::Workstation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::Workstation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new + # + # # Call the list_usable_workstations method. + # result = client.list_usable_workstations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. + # p item + # end + # + def list_usable_workstations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_usable_workstations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.list_usable_workstations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_usable_workstations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_usable_workstations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstations, request, response, 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 workstation. + # + # @overload create_workstation(request, options = nil) + # Pass arguments to `create_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::CreateWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) + # Pass arguments to `create_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param workstation_id [::String] + # Required. ID to use for the workstation. + # @param workstation [::Google::Cloud::Workstations::V1::Workstation, ::Hash] + # Required. Workstation to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::CreateWorkstationRequest.new + # + # # Call the create_workstation method. + # result = client.create_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.parent + header_params["parent"] = request.parent + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.create_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :create_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 workstation. + # + # @overload update_workstation(request, options = nil) + # Pass arguments to `update_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::UpdateWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workstation [::Google::Cloud::Workstations::V1::Workstation, ::Hash] + # Required. Workstation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration is created. In this situation, update_mask + # is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new + # + # # Call the update_workstation method. + # result = client.update_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.workstation&.name + header_params["workstation.name"] = request.workstation.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :update_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified workstation. + # + # @overload delete_workstation(request, options = nil) + # Pass arguments to `delete_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::DeleteWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new + # + # # Call the delete_workstation method. + # result = client.delete_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.delete_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :delete_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 running a workstation so that users can connect to it. + # + # @overload start_workstation(request, options = nil) + # Pass arguments to `start_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::StartWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::StartWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `start_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to start. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::StartWorkstationRequest.new + # + # # Call the start_workstation method. + # result = client.start_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::StartWorkstationRequest + + # Converts hash and nil to 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :start_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stops running a workstation, reducing costs. + # + # @overload stop_workstation(request, options = nil) + # Pass arguments to `stop_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::StopWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::StopWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `stop_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to stop. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::StopWorkstationRequest.new + # + # # Call the stop_workstation method. + # result = client.stop_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::StopWorkstationRequest + + # Converts hash and nil to 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stop_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :stop_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a short-lived credential that can be used to send authenticated and + # authorized traffic to a workstation. + # + # @overload generate_access_token(request, options = nil) + # Pass arguments to `generate_access_token` via a request object, either of type + # {::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_token(expire_time: nil, ttl: nil, workstation: nil) + # Pass arguments to `generate_access_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] + # Desired expiration time of the access token. This value must + # be at most 24 hours in the future. If a value is not specified, the + # token's expiration time will be set to a default value of 1 hour in the + # future. + # + # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. 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 ttl [::Google::Protobuf::Duration, ::Hash] + # Desired lifetime duration of the access token. This value must + # be at most 24 hours. If a value is not specified, the token's lifetime + # will be set to a default value of 1 hour. + # + # Note: The following parameters are mutually exclusive: `ttl`, `expire_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 workstation [::String] + # Required. Name of the workstation for which the access token should be + # generated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new + # + # # Call the generate_access_token method. + # result = client.generate_access_token request + # + # # The returned object is of type Google::Cloud::Workstations::V1::GenerateAccessTokenResponse. + # p result + # + def generate_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest + + # Converts hash and nil to 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_access_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.workstation + header_params["workstation"] = request.workstation + end + + request_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_access_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :generate_access_token, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Workstations API. + # + # This class represents the configuration for Workstations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Workstations::V1::Workstations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_workstation_cluster to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workstations::V1::Workstations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_workstation_cluster.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_workstation_cluster.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Workstations::V1::Workstations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workstations.googleapis.com" + + config_attr :endpoint, nil, ::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 Workstations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation_cluster + ## + # RPC-specific configuration for `list_workstation_clusters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstation_clusters + ## + # RPC-specific configuration for `create_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation_cluster + ## + # RPC-specific configuration for `update_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation_cluster + ## + # RPC-specific configuration for `delete_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation_cluster + ## + # RPC-specific configuration for `get_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation_config + ## + # RPC-specific configuration for `list_workstation_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstation_configs + ## + # RPC-specific configuration for `list_usable_workstation_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_usable_workstation_configs + ## + # RPC-specific configuration for `create_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation_config + ## + # RPC-specific configuration for `update_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation_config + ## + # RPC-specific configuration for `delete_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation_config + ## + # RPC-specific configuration for `get_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation + ## + # RPC-specific configuration for `list_workstations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstations + ## + # RPC-specific configuration for `list_usable_workstations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_usable_workstations + ## + # RPC-specific configuration for `create_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation + ## + # RPC-specific configuration for `update_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation + ## + # RPC-specific configuration for `delete_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation + ## + # RPC-specific configuration for `start_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :start_workstation + ## + # RPC-specific configuration for `stop_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_workstation + ## + # RPC-specific configuration for `generate_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_access_token + + # @private + def initialize parent_rpcs = nil + get_workstation_cluster_config = parent_rpcs.get_workstation_cluster if parent_rpcs.respond_to? :get_workstation_cluster + @get_workstation_cluster = ::Gapic::Config::Method.new get_workstation_cluster_config + list_workstation_clusters_config = parent_rpcs.list_workstation_clusters if parent_rpcs.respond_to? :list_workstation_clusters + @list_workstation_clusters = ::Gapic::Config::Method.new list_workstation_clusters_config + create_workstation_cluster_config = parent_rpcs.create_workstation_cluster if parent_rpcs.respond_to? :create_workstation_cluster + @create_workstation_cluster = ::Gapic::Config::Method.new create_workstation_cluster_config + update_workstation_cluster_config = parent_rpcs.update_workstation_cluster if parent_rpcs.respond_to? :update_workstation_cluster + @update_workstation_cluster = ::Gapic::Config::Method.new update_workstation_cluster_config + delete_workstation_cluster_config = parent_rpcs.delete_workstation_cluster if parent_rpcs.respond_to? :delete_workstation_cluster + @delete_workstation_cluster = ::Gapic::Config::Method.new delete_workstation_cluster_config + get_workstation_config_config = parent_rpcs.get_workstation_config if parent_rpcs.respond_to? :get_workstation_config + @get_workstation_config = ::Gapic::Config::Method.new get_workstation_config_config + list_workstation_configs_config = parent_rpcs.list_workstation_configs if parent_rpcs.respond_to? :list_workstation_configs + @list_workstation_configs = ::Gapic::Config::Method.new list_workstation_configs_config + list_usable_workstation_configs_config = parent_rpcs.list_usable_workstation_configs if parent_rpcs.respond_to? :list_usable_workstation_configs + @list_usable_workstation_configs = ::Gapic::Config::Method.new list_usable_workstation_configs_config + create_workstation_config_config = parent_rpcs.create_workstation_config if parent_rpcs.respond_to? :create_workstation_config + @create_workstation_config = ::Gapic::Config::Method.new create_workstation_config_config + update_workstation_config_config = parent_rpcs.update_workstation_config if parent_rpcs.respond_to? :update_workstation_config + @update_workstation_config = ::Gapic::Config::Method.new update_workstation_config_config + delete_workstation_config_config = parent_rpcs.delete_workstation_config if parent_rpcs.respond_to? :delete_workstation_config + @delete_workstation_config = ::Gapic::Config::Method.new delete_workstation_config_config + get_workstation_config = parent_rpcs.get_workstation if parent_rpcs.respond_to? :get_workstation + @get_workstation = ::Gapic::Config::Method.new get_workstation_config + list_workstations_config = parent_rpcs.list_workstations if parent_rpcs.respond_to? :list_workstations + @list_workstations = ::Gapic::Config::Method.new list_workstations_config + list_usable_workstations_config = parent_rpcs.list_usable_workstations if parent_rpcs.respond_to? :list_usable_workstations + @list_usable_workstations = ::Gapic::Config::Method.new list_usable_workstations_config + create_workstation_config = parent_rpcs.create_workstation if parent_rpcs.respond_to? :create_workstation + @create_workstation = ::Gapic::Config::Method.new create_workstation_config + update_workstation_config = parent_rpcs.update_workstation if parent_rpcs.respond_to? :update_workstation + @update_workstation = ::Gapic::Config::Method.new update_workstation_config + delete_workstation_config = parent_rpcs.delete_workstation if parent_rpcs.respond_to? :delete_workstation + @delete_workstation = ::Gapic::Config::Method.new delete_workstation_config + start_workstation_config = parent_rpcs.start_workstation if parent_rpcs.respond_to? :start_workstation + @start_workstation = ::Gapic::Config::Method.new start_workstation_config + stop_workstation_config = parent_rpcs.stop_workstation if parent_rpcs.respond_to? :stop_workstation + @stop_workstation = ::Gapic::Config::Method.new stop_workstation_config + generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token + @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb new file mode 100644 index 000000000000..dfd9bd39ea0a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/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 Workstations + module V1 + module Workstations + # Credentials for the Workstations 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-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb new file mode 100644 index 000000000000..667b9e605bce --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Workstations + module V1 + module Workstations + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Workstations 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 Workstations 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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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::Workstations::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workstations.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb new file mode 100644 index 000000000000..464e72c7f12e --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/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 Workstations + module V1 + module Workstations + # Path helper methods for the Workstations 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 Workstation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}` + # + # @param project [String] + # @param location [String] + # @param workstation_cluster [String] + # @param workstation_config [String] + # @param workstation [String] + # + # @return [::String] + def workstation_path project:, location:, workstation_cluster:, workstation_config:, workstation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "workstation_cluster cannot contain /" if workstation_cluster.to_s.include? "/" + raise ::ArgumentError, "workstation_config cannot contain /" if workstation_config.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}/workstations/#{workstation}" + end + + ## + # Create a fully-qualified WorkstationCluster resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}` + # + # @param project [String] + # @param location [String] + # @param workstation_cluster [String] + # + # @return [::String] + def workstation_cluster_path project:, location:, workstation_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}/workstationClusters/#{workstation_cluster}" + end + + ## + # Create a fully-qualified WorkstationConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}` + # + # @param project [String] + # @param location [String] + # @param workstation_cluster [String] + # @param workstation_config [String] + # + # @return [::String] + def workstation_config_path project:, location:, workstation_cluster:, workstation_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "workstation_cluster cannot contain /" if workstation_cluster.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb new file mode 100644 index 000000000000..ba4f83cc6e0c --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/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/workstations/v1/version" +require "google/cloud/workstations/v1/bindings_override" + +require "google/cloud/workstations/v1/workstations/credentials" +require "google/cloud/workstations/v1/workstations/paths" +require "google/cloud/workstations/v1/workstations/rest/operations" +require "google/cloud/workstations/v1/workstations/rest/client" + +module Google + module Cloud + module Workstations + module V1 + ## + # Service for interacting with Cloud Workstations. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/workstations/v1/workstations/rest" + # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + module Workstations + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/workstations/v1/workstations/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb new file mode 100644 index 000000000000..fe30c7b2e4fe --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb @@ -0,0 +1,2420 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/workstations/v1/workstations_pb" +require "google/cloud/workstations/v1/workstations/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Workstations + module V1 + module Workstations + module Rest + ## + # REST client for the Workstations service. + # + # Service for interacting with Cloud Workstations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workstations_stub + + ## + # Configure the Workstations Client class. + # + # See {::Google::Cloud::Workstations::V1::Workstations::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Workstations clients + # ::Google::Cloud::Workstations::V1::Workstations::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", "Workstations", "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_workstation_cluster.timeout = 60.0 + default_config.rpcs.get_workstation_cluster.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstation_clusters.timeout = 60.0 + default_config.rpcs.list_workstation_clusters.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation_cluster.timeout = 60.0 + + default_config.rpcs.update_workstation_cluster.timeout = 60.0 + + default_config.rpcs.delete_workstation_cluster.timeout = 60.0 + + default_config.rpcs.get_workstation_config.timeout = 60.0 + default_config.rpcs.get_workstation_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstation_configs.timeout = 60.0 + default_config.rpcs.list_workstation_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_usable_workstation_configs.timeout = 60.0 + default_config.rpcs.list_usable_workstation_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation_config.timeout = 60.0 + + default_config.rpcs.update_workstation_config.timeout = 60.0 + + default_config.rpcs.delete_workstation_config.timeout = 60.0 + + default_config.rpcs.get_workstation.timeout = 60.0 + default_config.rpcs.get_workstation.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstations.timeout = 60.0 + default_config.rpcs.list_workstations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_usable_workstations.timeout = 60.0 + default_config.rpcs.list_usable_workstations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation.timeout = 60.0 + + default_config.rpcs.update_workstation.timeout = 60.0 + + default_config.rpcs.delete_workstation.timeout = 60.0 + + default_config.rpcs.start_workstation.timeout = 60.0 + + default_config.rpcs.stop_workstation.timeout = 60.0 + + default_config.rpcs.generate_access_token.timeout = 60.0 + default_config.rpcs.generate_access_token.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 Workstations Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workstations::V1::Workstations::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 + @workstations_stub.universe_domain + end + + ## + # Create a new Workstations REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Workstations 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::Workstations::V1::Workstations::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 + + @workstations_stub = ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @workstations_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 = @workstations_stub.endpoint + config.universe_domain = @workstations_stub.universe_domain + config.logger = @workstations_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 = @workstations_stub.endpoint + config.universe_domain = @workstations_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @workstations_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Workstations::V1::Workstations::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 + @workstations_stub.logger + end + + # Service calls + + ## + # Returns the requested workstation cluster. + # + # @overload get_workstation_cluster(request, options = nil) + # Pass arguments to `get_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workstation_cluster(name: nil) + # Pass arguments to `get_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::WorkstationCluster] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new + # + # # Call the get_workstation_cluster method. + # result = client.get_workstation_cluster request + # + # # The returned object is of type Google::Cloud::Workstations::V1::WorkstationCluster. + # p result + # + def get_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workstation_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.get_workstation_cluster request, 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 all workstation clusters in the specified location. + # + # @overload list_workstation_clusters(request, options = nil) + # Pass arguments to `list_workstation_clusters` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workstation_clusters(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstation_clusters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::WorkstationCluster>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationCluster>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new + # + # # Call the list_workstation_clusters method. + # result = client.list_workstation_clusters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1::WorkstationCluster. + # p item + # end + # + def list_workstation_clusters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workstation_clusters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workstation_clusters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workstation_clusters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_workstation_clusters request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstation_clusters, "workstation_clusters", request, result, 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 workstation cluster. + # + # @overload create_workstation_cluster(request, options = nil) + # Pass arguments to `create_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) + # Pass arguments to `create_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param workstation_cluster_id [::String] + # Required. ID to use for the workstation cluster. + # @param workstation_cluster [::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash] + # Required. Workstation cluster to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new + # + # # Call the create_workstation_cluster method. + # result = client.create_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest + + # Converts hash and nil to an 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_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workstation_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.create_workstation_cluster request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation cluster. + # + # @overload update_workstation_cluster(request, options = nil) + # Pass arguments to `update_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workstation_cluster [::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash] + # Required. Workstation cluster to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask that specifies which fields in the workstation cluster + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set, and the workstation cluster is not found, a new + # workstation cluster will be created. In this situation, update_mask is + # ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new + # + # # Call the update_workstation_cluster method. + # result = client.update_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workstation_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.update_workstation_cluster request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation cluster. + # + # @overload delete_workstation_cluster(request, options = nil) + # Pass arguments to `delete_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation cluster to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation cluster on the server does not have this ETag. + # @param force [::Boolean] + # Optional. If set, any workstation configurations and workstations in the + # workstation cluster are also deleted. Otherwise, the request only + # works if the workstation cluster has no configurations or workstations. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new + # + # # Call the delete_workstation_cluster method. + # result = client.delete_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_workstation_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.delete_workstation_cluster request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested workstation configuration. + # + # @overload get_workstation_config(request, options = nil) + # Pass arguments to `get_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workstation_config(name: nil) + # Pass arguments to `get_workstation_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 requested resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::WorkstationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new + # + # # Call the get_workstation_config method. + # result = client.get_workstation_config request + # + # # The returned object is of type Google::Cloud::Workstations::V1::WorkstationConfig. + # p result + # + def get_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workstation_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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workstation_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.get_workstation_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 all workstation configurations in the specified cluster. + # + # @overload list_workstation_configs(request, options = nil) + # Pass arguments to `list_workstation_configs` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workstation_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstation_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. Parent resource name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::WorkstationConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new + # + # # Call the list_workstation_configs method. + # result = client.list_workstation_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::Workstations::V1::WorkstationConfig. + # p item + # end + # + def list_workstation_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workstation_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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workstation_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workstation_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_workstation_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstation_configs, "workstation_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all workstation configurations in the specified cluster on which + # the caller has the "workstations.workstation.create" permission. + # + # @overload list_usable_workstation_configs(request, options = nil) + # Pass arguments to `list_usable_workstation_configs` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_usable_workstation_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. Parent resource name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::WorkstationConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new + # + # # Call the list_usable_workstation_configs method. + # result = client.list_usable_workstation_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::Workstations::V1::WorkstationConfig. + # p item + # end + # + def list_usable_workstation_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_usable_workstation_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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_usable_workstation_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_usable_workstation_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_usable_workstation_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_usable_workstation_configs, "workstation_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 a new workstation configuration. + # + # @overload create_workstation_config(request, options = nil) + # Pass arguments to `create_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) + # Pass arguments to `create_workstation_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. Parent resource name. + # @param workstation_config_id [::String] + # Required. ID to use for the workstation configuration. + # @param workstation_config [::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash] + # Required. Config to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new + # + # # Call the create_workstation_config method. + # result = client.create_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest + + # Converts hash and nil to an 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_workstation_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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workstation_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.create_workstation_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing workstation configuration. + # + # @overload update_workstation_config(request, options = nil) + # Pass arguments to `update_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation_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 workstation_config [::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash] + # Required. Config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration will be created. In this situation, + # update_mask is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new + # + # # Call the update_workstation_config method. + # result = client.update_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_workstation_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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workstation_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.update_workstation_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified workstation configuration. + # + # @overload delete_workstation_config(request, options = nil) + # Pass arguments to `delete_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_workstation_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 workstation configuration to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request is rejected if the latest version of the + # workstation configuration on the server does not have this ETag. + # @param force [::Boolean] + # Optional. If set, any workstations in the workstation configuration are + # also deleted. Otherwise, the request works only if the workstation + # configuration has no workstations. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new + # + # # Call the delete_workstation_config method. + # result = client.delete_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_workstation_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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_workstation_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.delete_workstation_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested workstation. + # + # @overload get_workstation(request, options = nil) + # Pass arguments to `get_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::GetWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::GetWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workstation(name: nil) + # Pass arguments to `get_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::Workstation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::Workstation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::GetWorkstationRequest.new + # + # # Call the get_workstation method. + # result = client.get_workstation request + # + # # The returned object is of type Google::Cloud::Workstations::V1::Workstation. + # p result + # + def get_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.get_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.get_workstation request, 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 all Workstations using the specified workstation configuration. + # + # @overload list_workstations(request, options = nil) + # Pass arguments to `list_workstations` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListWorkstationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListWorkstationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workstations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::Workstation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::Workstation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListWorkstationsRequest.new + # + # # Call the list_workstations method. + # result = client.list_workstations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. + # p item + # end + # + def list_workstations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workstations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_workstations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workstations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_workstations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstations, "workstations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all workstations using the specified workstation configuration + # on which the caller has the "workstations.workstations.use" permission. + # + # @overload list_usable_workstations(request, options = nil) + # Pass arguments to `list_usable_workstations` via a request object, either of type + # {::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_usable_workstations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_usable_workstations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1::Workstation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::Workstation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new + # + # # Call the list_usable_workstations method. + # result = client.list_usable_workstations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. + # p item + # end + # + def list_usable_workstations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_usable_workstations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.list_usable_workstations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_usable_workstations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_usable_workstations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_usable_workstations, "workstations", request, result, 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 workstation. + # + # @overload create_workstation(request, options = nil) + # Pass arguments to `create_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::CreateWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) + # Pass arguments to `create_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param workstation_id [::String] + # Required. ID to use for the workstation. + # @param workstation [::Google::Cloud::Workstations::V1::Workstation, ::Hash] + # Required. Workstation to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::CreateWorkstationRequest.new + # + # # Call the create_workstation method. + # result = client.create_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationRequest + + # Converts hash and nil to an 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.create_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation. + # + # @overload update_workstation(request, options = nil) + # Pass arguments to `update_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::UpdateWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workstation [::Google::Cloud::Workstations::V1::Workstation, ::Hash] + # Required. Workstation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration is created. In this situation, update_mask + # is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new + # + # # Call the update_workstation method. + # result = client.update_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.update_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation. + # + # @overload delete_workstation(request, options = nil) + # Pass arguments to `delete_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::DeleteWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new + # + # # Call the delete_workstation method. + # result = client.delete_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.delete_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.delete_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 running a workstation so that users can connect to it. + # + # @overload start_workstation(request, options = nil) + # Pass arguments to `start_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::StartWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::StartWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `start_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to start. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::StartWorkstationRequest.new + # + # # Call the start_workstation method. + # result = client.start_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::StartWorkstationRequest + + # Converts hash and nil to an 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.start_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stops running a workstation, reducing costs. + # + # @overload stop_workstation(request, options = nil) + # Pass arguments to `stop_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1::StopWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::StopWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `stop_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to stop. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::StopWorkstationRequest.new + # + # # Call the stop_workstation method. + # result = client.stop_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::StopWorkstationRequest + + # Converts hash and nil to an 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stop_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.stop_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a short-lived credential that can be used to send authenticated and + # authorized traffic to a workstation. + # + # @overload generate_access_token(request, options = nil) + # Pass arguments to `generate_access_token` via a request object, either of type + # {::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_token(expire_time: nil, ttl: nil, workstation: nil) + # Pass arguments to `generate_access_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] + # Desired expiration time of the access token. This value must + # be at most 24 hours in the future. If a value is not specified, the + # token's expiration time will be set to a default value of 1 hour in the + # future. + # + # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. 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 ttl [::Google::Protobuf::Duration, ::Hash] + # Desired lifetime duration of the access token. This value must + # be at most 24 hours. If a value is not specified, the token's lifetime + # will be set to a default value of 1 hour. + # + # Note: The following parameters are mutually exclusive: `ttl`, `expire_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 workstation [::String] + # Required. Name of the workstation for which the access token should be + # generated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new + # + # # Call the generate_access_token method. + # result = client.generate_access_token request + # + # # The returned object is of type Google::Cloud::Workstations::V1::GenerateAccessTokenResponse. + # p result + # + def generate_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest + + # Converts hash and nil to an 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_access_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_token.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.generate_access_token request, 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 Workstations REST API. + # + # This class represents the configuration for Workstations 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::Workstations::V1::Workstations::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_workstation_cluster to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_workstation_cluster.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_workstation_cluster.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workstations.googleapis.com" + + config_attr :endpoint, nil, ::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 Workstations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation_cluster + ## + # RPC-specific configuration for `list_workstation_clusters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstation_clusters + ## + # RPC-specific configuration for `create_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation_cluster + ## + # RPC-specific configuration for `update_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation_cluster + ## + # RPC-specific configuration for `delete_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation_cluster + ## + # RPC-specific configuration for `get_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation_config + ## + # RPC-specific configuration for `list_workstation_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstation_configs + ## + # RPC-specific configuration for `list_usable_workstation_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_usable_workstation_configs + ## + # RPC-specific configuration for `create_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation_config + ## + # RPC-specific configuration for `update_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation_config + ## + # RPC-specific configuration for `delete_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation_config + ## + # RPC-specific configuration for `get_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation + ## + # RPC-specific configuration for `list_workstations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstations + ## + # RPC-specific configuration for `list_usable_workstations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_usable_workstations + ## + # RPC-specific configuration for `create_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation + ## + # RPC-specific configuration for `update_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation + ## + # RPC-specific configuration for `delete_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation + ## + # RPC-specific configuration for `start_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :start_workstation + ## + # RPC-specific configuration for `stop_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_workstation + ## + # RPC-specific configuration for `generate_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_access_token + + # @private + def initialize parent_rpcs = nil + get_workstation_cluster_config = parent_rpcs.get_workstation_cluster if parent_rpcs.respond_to? :get_workstation_cluster + @get_workstation_cluster = ::Gapic::Config::Method.new get_workstation_cluster_config + list_workstation_clusters_config = parent_rpcs.list_workstation_clusters if parent_rpcs.respond_to? :list_workstation_clusters + @list_workstation_clusters = ::Gapic::Config::Method.new list_workstation_clusters_config + create_workstation_cluster_config = parent_rpcs.create_workstation_cluster if parent_rpcs.respond_to? :create_workstation_cluster + @create_workstation_cluster = ::Gapic::Config::Method.new create_workstation_cluster_config + update_workstation_cluster_config = parent_rpcs.update_workstation_cluster if parent_rpcs.respond_to? :update_workstation_cluster + @update_workstation_cluster = ::Gapic::Config::Method.new update_workstation_cluster_config + delete_workstation_cluster_config = parent_rpcs.delete_workstation_cluster if parent_rpcs.respond_to? :delete_workstation_cluster + @delete_workstation_cluster = ::Gapic::Config::Method.new delete_workstation_cluster_config + get_workstation_config_config = parent_rpcs.get_workstation_config if parent_rpcs.respond_to? :get_workstation_config + @get_workstation_config = ::Gapic::Config::Method.new get_workstation_config_config + list_workstation_configs_config = parent_rpcs.list_workstation_configs if parent_rpcs.respond_to? :list_workstation_configs + @list_workstation_configs = ::Gapic::Config::Method.new list_workstation_configs_config + list_usable_workstation_configs_config = parent_rpcs.list_usable_workstation_configs if parent_rpcs.respond_to? :list_usable_workstation_configs + @list_usable_workstation_configs = ::Gapic::Config::Method.new list_usable_workstation_configs_config + create_workstation_config_config = parent_rpcs.create_workstation_config if parent_rpcs.respond_to? :create_workstation_config + @create_workstation_config = ::Gapic::Config::Method.new create_workstation_config_config + update_workstation_config_config = parent_rpcs.update_workstation_config if parent_rpcs.respond_to? :update_workstation_config + @update_workstation_config = ::Gapic::Config::Method.new update_workstation_config_config + delete_workstation_config_config = parent_rpcs.delete_workstation_config if parent_rpcs.respond_to? :delete_workstation_config + @delete_workstation_config = ::Gapic::Config::Method.new delete_workstation_config_config + get_workstation_config = parent_rpcs.get_workstation if parent_rpcs.respond_to? :get_workstation + @get_workstation = ::Gapic::Config::Method.new get_workstation_config + list_workstations_config = parent_rpcs.list_workstations if parent_rpcs.respond_to? :list_workstations + @list_workstations = ::Gapic::Config::Method.new list_workstations_config + list_usable_workstations_config = parent_rpcs.list_usable_workstations if parent_rpcs.respond_to? :list_usable_workstations + @list_usable_workstations = ::Gapic::Config::Method.new list_usable_workstations_config + create_workstation_config = parent_rpcs.create_workstation if parent_rpcs.respond_to? :create_workstation + @create_workstation = ::Gapic::Config::Method.new create_workstation_config + update_workstation_config = parent_rpcs.update_workstation if parent_rpcs.respond_to? :update_workstation + @update_workstation = ::Gapic::Config::Method.new update_workstation_config + delete_workstation_config = parent_rpcs.delete_workstation if parent_rpcs.respond_to? :delete_workstation + @delete_workstation = ::Gapic::Config::Method.new delete_workstation_config + start_workstation_config = parent_rpcs.start_workstation if parent_rpcs.respond_to? :start_workstation + @start_workstation = ::Gapic::Config::Method.new start_workstation_config + stop_workstation_config = parent_rpcs.stop_workstation if parent_rpcs.respond_to? :stop_workstation + @stop_workstation = ::Gapic::Config::Method.new stop_workstation_config + generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token + @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb new file mode 100644 index 000000000000..5408543aa712 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Workstations + module V1 + module Workstations + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Workstations 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 Workstations 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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workstations::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workstations.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb new file mode 100644 index 000000000000..420e199f7069 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb @@ -0,0 +1,1310 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workstations/v1/workstations_pb" + +module Google + module Cloud + module Workstations + module V1 + module Workstations + module Rest + ## + # REST service stub for the Workstations 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_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::WorkstationCluster] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] + # A result object deserialized from the server's reply + def get_workstation_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workstation_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1::WorkstationCluster.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workstation_clusters REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse] + # A result object deserialized from the server's reply + def list_workstation_clusters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workstation_clusters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workstation_clusters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse.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_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_workstation_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_workstation_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workstation_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::WorkstationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] + # A result object deserialized from the server's reply + def get_workstation_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_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_workstation_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1::WorkstationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workstation_configs REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse] + # A result object deserialized from the server's reply + def list_workstation_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workstation_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_workstation_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_usable_workstation_configs REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse] + # A result object deserialized from the server's reply + def list_usable_workstation_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_usable_workstation_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_usable_workstation_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse.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_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_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_workstation_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_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_workstation_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_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_workstation_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::Workstation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::Workstation] + # A result object deserialized from the server's reply + def get_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1::Workstation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workstations REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::ListWorkstationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::ListWorkstationsResponse] + # A result object deserialized from the server's reply + def list_workstations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workstations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workstations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1::ListWorkstationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_usable_workstations REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse] + # A result object deserialized from the server's reply + def list_usable_workstations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_usable_workstations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_usable_workstations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse.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_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::StartWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::StopWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stop_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_access_token REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] + # A result object deserialized from the server's reply + def generate_access_token request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_access_token_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_access_token", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse.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_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workstation_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workstation_clusters REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workstation_clusters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workstationClusters", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest] + # 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_workstation_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/workstationClusters", + body: "workstation_cluster", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workstation_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{workstation_cluster.name}", + body: "workstation_cluster", + matches: [ + ["workstation_cluster.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workstation_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workstation_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workstation_configs REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workstation_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workstationConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_usable_workstation_configs REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_usable_workstation_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workstationConfigs:listUsable", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest] + # 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_workstation_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/workstationConfigs", + body: "workstation_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workstation_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{workstation_config.name}", + body: "workstation_config", + matches: [ + ["workstation_config.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workstation_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workstations REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workstations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workstations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_usable_workstations REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_usable_workstations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/workstations:listUsable", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationRequest] + # 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_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/workstations", + body: "workstation", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{workstation.name}", + body: "workstation", + matches: [ + ["workstation.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::StartWorkstationRequest] + # 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_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the stop_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::StopWorkstationRequest] + # 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_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:stop", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_access_token REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest] + # 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_access_token_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{workstation}:generateAccessToken", + body: "*", + matches: [ + ["workstation", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb new file mode 100644 index 000000000000..d6d6c7cebef9 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/workstations/v1/workstations.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/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n/google/cloud/workstations/v1/workstations.proto\x12\x1cgoogle.cloud.workstations.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 google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x87\t\n\x12WorkstationCluster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12[\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x41.google.cloud.workstations.v1.WorkstationCluster.AnnotationsEntryB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\x0f \x03(\x0b\x32<.google.cloud.workstations.v1.WorkstationCluster.LabelsEntryB\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\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07network\x18\n \x01(\tB\x03\xe0\x41\x05\x12\x17\n\nsubnetwork\x18\x0b \x01(\tB\x03\xe0\x41\x05\x12\x1d\n\x10\x63ontrol_plane_ip\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12j\n\x16private_cluster_config\x18\x0c \x01(\x0b\x32\x45.google.cloud.workstations.v1.WorkstationCluster.PrivateClusterConfigB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65graded\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x0e \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\x9f\x01\n\x14PrivateClusterConfig\x12$\n\x17\x65nable_private_endpoint\x18\x01 \x01(\x08\x42\x03\xe0\x41\x05\x12\x1d\n\x10\x63luster_hostname\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16service_attachment_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x61llowed_projects\x18\x04 \x03(\tB\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb3\x01\xea\x41\xaf\x01\n.workstations.googleapis.com/WorkstationCluster\x12Qprojects/{project}/locations/{location}/workstationClusters/{workstation_cluster}*\x13workstationClusters2\x12workstationClusterR\x01\x01\"\xb2\x19\n\x11WorkstationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12Z\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32@.google.cloud.workstations.v1.WorkstationConfig.AnnotationsEntryB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x12 \x03(\x0b\x32;.google.cloud.workstations.v1.WorkstationConfig.LabelsEntryB\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\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0frunning_timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12G\n\x04host\x18\x0c \x01(\x0b\x32\x34.google.cloud.workstations.v1.WorkstationConfig.HostB\x03\xe0\x41\x01\x12h\n\x16persistent_directories\x18\r \x03(\x0b\x32\x43.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectoryB\x03\xe0\x41\x01\x12Q\n\tcontainer\x18\x0e \x01(\x0b\x32\x39.google.cloud.workstations.v1.WorkstationConfig.ContainerB\x03\xe0\x41\x01\x12\x62\n\x0e\x65ncryption_key\x18\x11 \x01(\x0b\x32\x45.google.cloud.workstations.v1.WorkstationConfig.CustomerEncryptionKeyB\x03\xe0\x41\x05\x12]\n\x10readiness_checks\x18\x13 \x03(\x0b\x32>.google.cloud.workstations.v1.WorkstationConfig.ReadinessCheckB\x03\xe0\x41\x01\x12\x1d\n\rreplica_zones\x18\x17 \x03(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12\x15\n\x08\x64\x65graded\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x10 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\xf5\x06\n\x04Host\x12X\n\x0cgce_instance\x18\x01 \x01(\x0b\x32@.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstanceH\x00\x1a\x88\x06\n\x0bGceInstance\x12\x19\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16service_account_scopes\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10pooled_instances\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12(\n\x1b\x64isable_public_ip_addresses\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x81\x01\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32Z.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceShieldedInstanceConfigB\x03\xe0\x41\x01\x12\x89\x01\n\x1c\x63onfidential_instance_config\x18\n \x01(\x0b\x32^.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfigB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\t \x01(\x05\x42\x03\xe0\x41\x01\x1a\x80\x01\n\x19GceShieldedInstanceConfig\x12\x1f\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x65nable_vtpm\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1b\x65nable_integrity_monitoring\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x1dGceConfidentialInstanceConfig\x12(\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x42\x08\n\x06\x63onfig\x1a\x85\x04\n\x13PersistentDirectory\x12o\n\x06gce_pd\x18\x02 \x01(\x0b\x32].google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xd1\x02\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07\x66s_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x88\x01\n\x0ereclaim_policy\x18\x04 \x01(\x0e\x32k.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicyB\x03\xe0\x41\x01\"G\n\rReclaimPolicy\x12\x1e\n\x1aRECLAIM_POLICY_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\n\n\x06RETAIN\x10\x02\x42\x10\n\x0e\x64irectory_type\x1a\xfe\x01\n\tContainer\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63ommand\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61rgs\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12T\n\x03\x65nv\x18\x04 \x03(\x0b\x32\x42.google.cloud.workstations.v1.WorkstationConfig.Container.EnvEntryB\x03\xe0\x41\x01\x12\x18\n\x0bworking_dir\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0brun_as_user\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aS\n\x15\x43ustomerEncryptionKey\x12\x14\n\x07kms_key\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12$\n\x17kms_key_service_account\x18\x02 \x01(\tB\x03\xe0\x41\x05\x1a\x36\n\x0eReadinessCheck\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xd8\x01\xea\x41\xd4\x01\n-workstations.googleapis.com/WorkstationConfig\x12yprojects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}*\x12workstationConfigs2\x11workstationConfigR\x01\x01\"\xfc\x07\n\x0bWorkstation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12T\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32:.google.cloud.workstations.v1.Workstation.AnnotationsEntryB\x03\xe0\x41\x01\x12J\n\x06labels\x18\r \x03(\x0b\x32\x35.google.cloud.workstations.v1.Workstation.LabelsEntryB\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\x33\n\nstart_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x05state\x18\n \x01(\x0e\x32/.google.cloud.workstations.v1.Workstation.StateB\x03\xe0\x41\x03\x12\x11\n\x04host\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATE_STARTING\x10\x01\x12\x11\n\rSTATE_RUNNING\x10\x02\x12\x12\n\x0eSTATE_STOPPING\x10\x03\x12\x11\n\rSTATE_STOPPED\x10\x04:\xe2\x01\xea\x41\xde\x01\n\'workstations.googleapis.com/Workstation\x12\x94\x01projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}*\x0cworkstations2\x0bworkstationR\x01\x01\"d\n\x1cGetWorkstationClusterRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\"\x99\x01\n\x1eListWorkstationClustersRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.workstations.googleapis.com/WorkstationCluster\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\"\x9f\x01\n\x1fListWorkstationClustersResponse\x12N\n\x14workstation_clusters\x18\x01 \x03(\x0b\x32\x30.google.cloud.workstations.v1.WorkstationCluster\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xfe\x01\n\x1f\x43reateWorkstationClusterRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.workstations.googleapis.com/WorkstationCluster\x12#\n\x16workstation_cluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x13workstation_cluster\x18\x03 \x01(\x0b\x32\x30.google.cloud.workstations.v1.WorkstationClusterB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe3\x01\n\x1fUpdateWorkstationClusterRequest\x12R\n\x13workstation_cluster\x18\x01 \x01(\x0b\x32\x30.google.cloud.workstations.v1.WorkstationClusterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x01\n\x1f\x44\x65leteWorkstationClusterRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"b\n\x1bGetWorkstationConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\"\x98\x01\n\x1dListWorkstationConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\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\x1eListWorkstationConfigsResponse\x12L\n\x13workstation_configs\x18\x01 \x03(\x0b\x32/.google.cloud.workstations.v1.WorkstationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x9e\x01\n#ListUsableWorkstationConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\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\"\xa2\x01\n$ListUsableWorkstationConfigsResponse\x12L\n\x13workstation_configs\x18\x01 \x03(\x0b\x32/.google.cloud.workstations.v1.WorkstationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xfa\x01\n\x1e\x43reateWorkstationConfigRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\x12\"\n\x15workstation_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x12workstation_config\x18\x03 \x01(\x0b\x32/.google.cloud.workstations.v1.WorkstationConfigB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe0\x01\n\x1eUpdateWorkstationConfigRequest\x12P\n\x12workstation_config\x18\x01 \x01(\x0b\x32/.google.cloud.workstations.v1.WorkstationConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x1e\x44\x65leteWorkstationConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x15GetWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\"\x91\x01\n\x17ListWorkstationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\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\"\x93\x01\n\x18ListWorkstationsResponse\x12?\n\x0cworkstations\x18\x01 \x03(\x0b\x32).google.cloud.workstations.v1.Workstation\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x97\x01\n\x1dListUsableWorkstationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\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\"\x8f\x01\n\x1eListUsableWorkstationsResponse\x12?\n\x0cworkstations\x18\x01 \x03(\x0b\x32).google.cloud.workstations.v1.Workstation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xdf\x01\n\x18\x43reateWorkstationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\x12\x1b\n\x0eworkstation_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x0bworkstation\x18\x03 \x01(\x0b\x32).google.cloud.workstations.v1.WorkstationB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xcd\x01\n\x18UpdateWorkstationRequest\x12\x43\n\x0bworkstation\x18\x01 \x01(\x0b\x32).google.cloud.workstations.v1.WorkstationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x01\n\x18\x44\x65leteWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x17StartWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x16StopWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xcd\x01\n\x1aGenerateAccessTokenRequest\x12\x31\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12(\n\x03ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x44\n\x0bworkstation\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/WorkstationB\x0c\n\nexpiration\"d\n\x1bGenerateAccessTokenResponse\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\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\x9b*\n\x0cWorkstations\x12\xcd\x01\n\x15GetWorkstationCluster\x12:.google.cloud.workstations.v1.GetWorkstationClusterRequest\x1a\x30.google.cloud.workstations.v1.WorkstationCluster\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/workstationClusters/*}\x12\xe0\x01\n\x17ListWorkstationClusters\x12<.google.cloud.workstations.v1.ListWorkstationClustersRequest\x1a=.google.cloud.workstations.v1.ListWorkstationClustersResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/workstationClusters\x12\xad\x02\n\x18\x43reateWorkstationCluster\x12=.google.cloud.workstations.v1.CreateWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x31parent,workstation_cluster,workstation_cluster_id\x82\xd3\xe4\x93\x02N\"7/v1/{parent=projects/*/locations/*}/workstationClusters:\x13workstation_cluster\x12\xaf\x02\n\x18UpdateWorkstationCluster\x12=.google.cloud.workstations.v1.UpdateWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x1fworkstation_cluster,update_mask\x82\xd3\xe4\x93\x02\x62\x32K/v1/{workstation_cluster.name=projects/*/locations/*/workstationClusters/*}:\x13workstation_cluster\x12\xea\x01\n\x18\x44\x65leteWorkstationCluster\x12=.google.cloud.workstations.v1.DeleteWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/workstationClusters/*}\x12\xdf\x01\n\x14GetWorkstationConfig\x12\x39.google.cloud.workstations.v1.GetWorkstationConfigRequest\x1a/.google.cloud.workstations.v1.WorkstationConfig\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}\x12\xf2\x01\n\x16ListWorkstationConfigs\x12;.google.cloud.workstations.v1.ListWorkstationConfigsRequest\x1a<.google.cloud.workstations.v1.ListWorkstationConfigsResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v1/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs\x12\x8f\x02\n\x1cListUsableWorkstationConfigs\x12\x41.google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest\x1a\x42.google.cloud.workstations.v1.ListUsableWorkstationConfigsResponse\"h\xda\x41\x06parent\x82\xd3\xe4\x93\x02Y\x12W/v1/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs:listUsable\x12\xbc\x02\n\x17\x43reateWorkstationConfig\x12<.google.cloud.workstations.v1.CreateWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc3\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41/parent,workstation_config,workstation_config_id\x82\xd3\xe4\x93\x02\x62\"L/v1/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs:\x12workstation_config\x12\xbe\x02\n\x17UpdateWorkstationConfig\x12<.google.cloud.workstations.v1.UpdateWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc5\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41\x1eworkstation_config,update_mask\x82\xd3\xe4\x93\x02u2_/v1/{workstation_config.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}:\x12workstation_config\x12\xfd\x01\n\x17\x44\x65leteWorkstationConfig\x12<.google.cloud.workstations.v1.DeleteWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02N*L/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}\x12\xdc\x01\n\x0eGetWorkstation\x12\x33.google.cloud.workstations.v1.GetWorkstationRequest\x1a).google.cloud.workstations.v1.Workstation\"j\xda\x41\x04name\x82\xd3\xe4\x93\x02]\x12[/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}\x12\xef\x01\n\x10ListWorkstations\x12\x35.google.cloud.workstations.v1.ListWorkstationsRequest\x1a\x36.google.cloud.workstations.v1.ListWorkstationsResponse\"l\xda\x41\x06parent\x82\xd3\xe4\x93\x02]\x12[/v1/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations\x12\x8c\x02\n\x16ListUsableWorkstations\x12;.google.cloud.workstations.v1.ListUsableWorkstationsRequest\x1a<.google.cloud.workstations.v1.ListUsableWorkstationsResponse\"w\xda\x41\x06parent\x82\xd3\xe4\x93\x02h\x12\x66/v1/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations:listUsable\x12\xa4\x02\n\x11\x43reateWorkstation\x12\x36.google.cloud.workstations.v1.CreateWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41!parent,workstation,workstation_id\x82\xd3\xe4\x93\x02j\"[/v1/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations:\x0bworkstation\x12\xa6\x02\n\x11UpdateWorkstation\x12\x36.google.cloud.workstations.v1.UpdateWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x17workstation,update_mask\x82\xd3\xe4\x93\x02v2g/v1/{workstation.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:\x0bworkstation\x12\xfa\x01\n\x11\x44\x65leteWorkstation\x12\x36.google.cloud.workstations.v1.DeleteWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02]*[/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}\x12\x81\x02\n\x10StartWorkstation\x12\x35.google.cloud.workstations.v1.StartWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x66\"a/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:start:\x01*\x12\xfe\x01\n\x0fStopWorkstation\x12\x34.google.cloud.workstations.v1.StopWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x65\"`/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:stop:\x01*\x12\x9c\x02\n\x13GenerateAccessToken\x12\x38.google.cloud.workstations.v1.GenerateAccessTokenRequest\x1a\x39.google.cloud.workstations.v1.GenerateAccessTokenResponse\"\x8f\x01\xda\x41\x0bworkstation\x82\xd3\xe4\x93\x02{\"v/v1/{workstation=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:generateAccessToken:\x01*\x1aO\xca\x41\x1bworkstations.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB}\n com.google.cloud.workstations.v1B\x11WorkstationsProtoP\x01ZDcloud.google.com/go/workstations/apiv1/workstationspb;workstationspbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Workstations + module V1 + WorkstationCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster").msgclass + WorkstationCluster::PrivateClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster.PrivateClusterConfig").msgclass + WorkstationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig").msgclass + WorkstationConfig::Host = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host").msgclass + WorkstationConfig::Host::GceInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance").msgclass + WorkstationConfig::Host::GceInstance::GceShieldedInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceShieldedInstanceConfig").msgclass + WorkstationConfig::Host::GceInstance::GceConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfig").msgclass + WorkstationConfig::PersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory").msgclass + WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk").msgclass + WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicy").enummodule + WorkstationConfig::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Container").msgclass + WorkstationConfig::CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.CustomerEncryptionKey").msgclass + WorkstationConfig::ReadinessCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.ReadinessCheck").msgclass + Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation").msgclass + Workstation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.State").enummodule + GetWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GetWorkstationClusterRequest").msgclass + ListWorkstationClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationClustersRequest").msgclass + ListWorkstationClustersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationClustersResponse").msgclass + CreateWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.CreateWorkstationClusterRequest").msgclass + UpdateWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.UpdateWorkstationClusterRequest").msgclass + DeleteWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.DeleteWorkstationClusterRequest").msgclass + GetWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GetWorkstationConfigRequest").msgclass + ListWorkstationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationConfigsRequest").msgclass + ListWorkstationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationConfigsResponse").msgclass + ListUsableWorkstationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest").msgclass + ListUsableWorkstationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListUsableWorkstationConfigsResponse").msgclass + CreateWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.CreateWorkstationConfigRequest").msgclass + UpdateWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.UpdateWorkstationConfigRequest").msgclass + DeleteWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.DeleteWorkstationConfigRequest").msgclass + GetWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GetWorkstationRequest").msgclass + ListWorkstationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationsRequest").msgclass + ListWorkstationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationsResponse").msgclass + ListUsableWorkstationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListUsableWorkstationsRequest").msgclass + ListUsableWorkstationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListUsableWorkstationsResponse").msgclass + CreateWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.CreateWorkstationRequest").msgclass + UpdateWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.UpdateWorkstationRequest").msgclass + DeleteWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.DeleteWorkstationRequest").msgclass + StartWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.StartWorkstationRequest").msgclass + StopWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.StopWorkstationRequest").msgclass + GenerateAccessTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GenerateAccessTokenRequest").msgclass + GenerateAccessTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GenerateAccessTokenResponse").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb new file mode 100644 index 000000000000..023403299d59 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb @@ -0,0 +1,86 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/workstations/v1/workstations.proto for package 'google.cloud.workstations.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/workstations/v1/workstations_pb' + +module Google + module Cloud + module Workstations + module V1 + module Workstations + # Service for interacting with Cloud Workstations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.workstations.v1.Workstations' + + # Returns the requested workstation cluster. + rpc :GetWorkstationCluster, ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest, ::Google::Cloud::Workstations::V1::WorkstationCluster + # Returns all workstation clusters in the specified location. + rpc :ListWorkstationClusters, ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest, ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse + # Creates a new workstation cluster. + rpc :CreateWorkstationCluster, ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest, ::Google::Longrunning::Operation + # Updates an existing workstation cluster. + rpc :UpdateWorkstationCluster, ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest, ::Google::Longrunning::Operation + # Deletes the specified workstation cluster. + rpc :DeleteWorkstationCluster, ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest, ::Google::Longrunning::Operation + # Returns the requested workstation configuration. + rpc :GetWorkstationConfig, ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest, ::Google::Cloud::Workstations::V1::WorkstationConfig + # Returns all workstation configurations in the specified cluster. + rpc :ListWorkstationConfigs, ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest, ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse + # Returns all workstation configurations in the specified cluster on which + # the caller has the "workstations.workstation.create" permission. + rpc :ListUsableWorkstationConfigs, ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest, ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse + # Creates a new workstation configuration. + rpc :CreateWorkstationConfig, ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest, ::Google::Longrunning::Operation + # Updates an existing workstation configuration. + rpc :UpdateWorkstationConfig, ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest, ::Google::Longrunning::Operation + # Deletes the specified workstation configuration. + rpc :DeleteWorkstationConfig, ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest, ::Google::Longrunning::Operation + # Returns the requested workstation. + rpc :GetWorkstation, ::Google::Cloud::Workstations::V1::GetWorkstationRequest, ::Google::Cloud::Workstations::V1::Workstation + # Returns all Workstations using the specified workstation configuration. + rpc :ListWorkstations, ::Google::Cloud::Workstations::V1::ListWorkstationsRequest, ::Google::Cloud::Workstations::V1::ListWorkstationsResponse + # Returns all workstations using the specified workstation configuration + # on which the caller has the "workstations.workstations.use" permission. + rpc :ListUsableWorkstations, ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest, ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse + # Creates a new workstation. + rpc :CreateWorkstation, ::Google::Cloud::Workstations::V1::CreateWorkstationRequest, ::Google::Longrunning::Operation + # Updates an existing workstation. + rpc :UpdateWorkstation, ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest, ::Google::Longrunning::Operation + # Deletes the specified workstation. + rpc :DeleteWorkstation, ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest, ::Google::Longrunning::Operation + # Starts running a workstation so that users can connect to it. + rpc :StartWorkstation, ::Google::Cloud::Workstations::V1::StartWorkstationRequest, ::Google::Longrunning::Operation + # Stops running a workstation, reducing costs. + rpc :StopWorkstation, ::Google::Cloud::Workstations::V1::StopWorkstationRequest, ::Google::Longrunning::Operation + # Returns a short-lived credential that can be used to send authenticated and + # authorized traffic to a workstation. + rpc :GenerateAccessToken, ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest, ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/README.md new file mode 100644 index 000000000000..4081c926988b --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Workstations 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-workstations-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb new file mode 100644 index 000000000000..97b65f828112 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.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! + + +module Google + module Cloud + module Workstations + module V1 + # A workstation cluster resource in the Cloud Workstations API. + # + # Defines a group of workstations in a particular region and the + # VPC network they're attached to. + # @!attribute [rw] name + # @return [::String] + # Full name of this workstation cluster. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human-readable name for this workstation cluster. + # @!attribute [r] uid + # @return [::String] + # Output only. A system-assigned unique identifier for this workstation + # cluster. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Indicates whether this workstation cluster is currently being + # updated to match its intended state. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client-specified annotations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. + # [Labels](https://cloud.google.com/workstations/docs/label-resources) that + # are applied to the workstation cluster and that are also propagated to the + # underlying Compute Engine resources. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation cluster was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation cluster was most recently updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation cluster was soft-deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. Checksum computed by the server. May be sent on update and delete + # requests to make sure that the client has an up-to-date value before + # proceeding. + # @!attribute [rw] network + # @return [::String] + # Immutable. Name of the Compute Engine network in which instances associated + # with this workstation cluster will be created. + # @!attribute [rw] subnetwork + # @return [::String] + # Immutable. Name of the Compute Engine subnetwork in which instances + # associated with this workstation cluster will be created. Must be part of + # the subnetwork specified for this workstation cluster. + # @!attribute [r] control_plane_ip + # @return [::String] + # Output only. The private IP address of the control plane for this + # workstation cluster. Workstation VMs need access to this IP address to work + # with the service, so make sure that your firewall rules allow egress from + # the workstation VMs to this address. + # @!attribute [rw] private_cluster_config + # @return [::Google::Cloud::Workstations::V1::WorkstationCluster::PrivateClusterConfig] + # Optional. Configuration for private workstation cluster. + # @!attribute [r] degraded + # @return [::Boolean] + # Output only. Whether this workstation cluster is in degraded mode, in which + # case it may require user action to restore full functionality. Details can + # be found in + # {::Google::Cloud::Workstations::V1::WorkstationCluster#conditions conditions}. + # @!attribute [r] conditions + # @return [::Array<::Google::Rpc::Status>] + # Output only. Status conditions describing the workstation cluster's current + # state. + class WorkstationCluster + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration options for private workstation clusters. + # @!attribute [rw] enable_private_endpoint + # @return [::Boolean] + # Immutable. Whether Workstations endpoint is private. + # @!attribute [r] cluster_hostname + # @return [::String] + # Output only. Hostname for the workstation cluster. This field will be + # populated only when private endpoint is enabled. To access workstations + # in the workstation cluster, create a new DNS zone mapping this domain + # name to an internal IP address and a forwarding rule mapping that address + # to the service attachment. + # @!attribute [r] service_attachment_uri + # @return [::String] + # Output only. Service attachment URI for the workstation cluster. The + # service attachemnt is created when private endpoint is enabled. To access + # workstations in the workstation cluster, configure access to the managed + # service using [Private Service + # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + # @!attribute [rw] allowed_projects + # @return [::Array<::String>] + # Optional. Additional projects that are allowed to attach to the + # workstation cluster's service attachment. By default, the workstation + # cluster's project and the VPC host project (if different) are allowed. + class PrivateClusterConfig + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A workstation configuration resource in the Cloud Workstations API. + # + # Workstation configurations act as templates for workstations. The workstation + # configuration defines details such as the workstation virtual machine (VM) + # instance type, persistent storage, container image defining environment, + # which IDE or Code Editor to use, and more. Administrators and platform teams + # can also use [Identity and Access Management + # (IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to + # teams or to individual developers. + # @!attribute [rw] name + # @return [::String] + # Full name of this workstation configuration. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human-readable name for this workstation configuration. + # @!attribute [r] uid + # @return [::String] + # Output only. A system-assigned unique identifier for this workstation + # configuration. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Indicates whether this workstation configuration is currently + # being updated to match its intended state. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client-specified annotations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. + # [Labels](https://cloud.google.com/workstations/docs/label-resources) that + # are applied to the workstation configuration and that are also propagated + # to the underlying Compute Engine resources. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation configuration was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation configuration was most recently + # updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation configuration was soft-deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. Checksum computed by the server. May be sent on update and delete + # requests to make sure that the client has an up-to-date value before + # proceeding. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Number of seconds to wait before automatically stopping a + # workstation after it last received user traffic. + # + # A value of `"0s"` indicates that Cloud Workstations VMs created with this + # configuration should never time out due to idleness. + # Provide + # [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) + # terminated by `s` for seconds—for example, `"7200s"` (2 hours). + # The default is `"1200s"` (20 minutes). + # @!attribute [rw] running_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Number of seconds that a workstation can run until it is + # automatically shut down. We recommend that workstations be shut down daily + # to reduce costs and so that security updates can be applied upon restart. + # The + # {::Google::Cloud::Workstations::V1::WorkstationConfig#idle_timeout idle_timeout} + # and + # {::Google::Cloud::Workstations::V1::WorkstationConfig#running_timeout running_timeout} + # fields are independent of each other. Note that the + # {::Google::Cloud::Workstations::V1::WorkstationConfig#running_timeout running_timeout} + # field shuts down VMs after the specified time, regardless of whether or not + # the VMs are idle. + # + # Provide duration terminated by `s` for seconds—for example, `"54000s"` + # (15 hours). Defaults to `"43200s"` (12 hours). A value of `"0s"` indicates + # that workstations using this configuration should never time out. If + # {::Google::Cloud::Workstations::V1::WorkstationConfig#encryption_key encryption_key} + # is set, it must be greater than `"0s"` and less than + # `"86400s"` (24 hours). + # + # Warning: A value of `"0s"` indicates that Cloud Workstations VMs created + # with this configuration have no maximum running time. This is strongly + # discouraged because you incur costs and will not pick up security updates. + # @!attribute [rw] host + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Host] + # Optional. Runtime host for the workstation. + # @!attribute [rw] persistent_directories + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory>] + # Optional. Directories to persist across workstation sessions. + # @!attribute [rw] container + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Container] + # Optional. Container that runs upon startup for each workstation using this + # workstation configuration. + # @!attribute [rw] encryption_key + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::CustomerEncryptionKey] + # Immutable. Encrypts resources of this workstation configuration using a + # customer-managed encryption key (CMEK). + # + # If specified, the boot disk of the Compute Engine instance and the + # persistent disk are encrypted using this encryption key. If + # this field is not set, the disks are encrypted using a generated + # key. Customer-managed encryption keys do not protect disk metadata. + # + # If the customer-managed encryption key is rotated, when the workstation + # instance is stopped, the system attempts to recreate the + # persistent disk with the new version of the key. Be sure to keep + # older versions of the key until the persistent disk is recreated. + # Otherwise, data on the persistent disk might be lost. + # + # If the encryption key is revoked, the workstation session automatically + # stops within 7 hours. + # + # Immutable after the workstation configuration is created. + # @!attribute [rw] readiness_checks + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::ReadinessCheck>] + # Optional. Readiness checks to perform when starting a workstation using + # this workstation configuration. Mark a workstation as running only after + # all specified readiness checks return 200 status codes. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # Optional. Immutable. Specifies the zones used to replicate the VM and disk + # resources within the region. If set, exactly two zones within the + # workstation cluster's region must be specified—for example, + # `['us-central1-a', 'us-central1-f']`. If this field is empty, two default + # zones within the region are used. + # + # Immutable after the workstation configuration is created. + # @!attribute [r] degraded + # @return [::Boolean] + # Output only. Whether this resource is degraded, in which case it may + # require user action to restore full functionality. See also the + # {::Google::Cloud::Workstations::V1::WorkstationConfig#conditions conditions} + # field. + # @!attribute [r] conditions + # @return [::Array<::Google::Rpc::Status>] + # Output only. Status conditions describing the current resource state. + class WorkstationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Runtime host for a workstation. + # @!attribute [rw] gce_instance + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance] + # Specifies a Compute Engine instance as the host. + class Host + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A runtime using a Compute Engine instance. + # @!attribute [rw] machine_type + # @return [::String] + # Optional. The type of machine to use for VM instances—for example, + # `"e2-standard-4"`. For more information about machine types that + # Cloud Workstations supports, see the list of + # [available machine + # types](https://cloud.google.com/workstations/docs/available-machine-types). + # @!attribute [rw] service_account + # @return [::String] + # Optional. The email address of the service account for Cloud + # Workstations VMs created with this configuration. When specified, be + # sure that the service account has `logginglogEntries.create` permission + # on the project so it can write logs out to Cloud Logging. If using a + # custom container image, the service account must have permissions to + # pull the specified image. + # + # If you as the administrator want to be able to `ssh` into the + # underlying VM, you need to set this value to a service account + # for which you have the `iam.serviceAccounts.actAs` permission. + # Conversely, if you don't want anyone to be able to `ssh` into the + # underlying VM, use a service account where no one has that + # permission. + # + # If not set, VMs run with a service account provided by the + # Cloud Workstations service, and the image must be publicly + # accessible. + # @!attribute [rw] service_account_scopes + # @return [::Array<::String>] + # Optional. Scopes to grant to the + # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance#service_account service_account}. + # Various scopes are automatically added based on feature usage. When + # specified, users of workstations under this configuration must have + # `iam.serviceAccounts.actAs` on the service account. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Optional. Network tags to add to the Compute Engine VMs backing the + # workstations. This option applies + # [network + # tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs + # created with this configuration. These network tags enable the creation + # of [firewall + # rules](https://cloud.google.com/workstations/docs/configure-firewall-rules). + # @!attribute [rw] pool_size + # @return [::Integer] + # Optional. The number of VMs that the system should keep idle so that + # new workstations can be started quickly for new users. Defaults to `0` + # in the API. + # @!attribute [r] pooled_instances + # @return [::Integer] + # Output only. Number of instances currently available in the pool for + # faster workstation startup. + # @!attribute [rw] disable_public_ip_addresses + # @return [::Boolean] + # Optional. When set to true, disables public IP addresses for VMs. If + # you disable public IP addresses, you must set up Private Google Access + # or Cloud NAT on your network. If you use Private Google Access and you + # use `private.googleapis.com` or `restricted.googleapis.com` for + # Container Registry and Artifact Registry, make sure that you set + # up DNS records for domains `*.gcr.io` and `*.pkg.dev`. + # Defaults to false (VMs have public IP addresses). + # @!attribute [rw] enable_nested_virtualization + # @return [::Boolean] + # Optional. Whether to enable nested virtualization on Cloud Workstations + # VMs created under this workstation configuration. + # + # Nested virtualization lets you run virtual machine (VM) instances + # inside your workstation. Before enabling nested virtualization, + # consider the following important considerations. Cloud Workstations + # instances are subject to the [same restrictions as Compute Engine + # instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): + # + # * **Organization policy**: projects, folders, or + # organizations may be restricted from creating nested VMs if the + # **Disable VM nested virtualization** constraint is enforced in + # the organization policy. For more information, see the + # Compute Engine section, + # [Checking whether nested virtualization is + # allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). + # * **Performance**: nested VMs might experience a 10% or greater + # decrease in performance for workloads that are CPU-bound and + # possibly greater than a 10% decrease for workloads that are + # input/output bound. + # * **Machine Type**: nested virtualization can only be enabled on + # workstation configurations that specify a + # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance#machine_type machine_type} + # in the N1 or N2 machine series. + # * **GPUs**: nested virtualization may not be enabled on workstation + # configurations with accelerators. + # * **Operating System**: Because + # [Container-Optimized + # OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) + # does not support nested virtualization, when nested virtualization is + # enabled, the underlying Compute Engine VM instances boot from an + # [Ubuntu + # LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) + # image. + # @!attribute [rw] shielded_instance_config + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::GceShieldedInstanceConfig] + # Optional. A set of Compute Engine Shielded instance options. + # @!attribute [rw] confidential_instance_config + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::GceConfidentialInstanceConfig] + # Optional. A set of Compute Engine Confidential VM instance options. + # @!attribute [rw] boot_disk_size_gb + # @return [::Integer] + # Optional. The size of the boot disk for the VM in gigabytes (GB). + # The minimum boot disk size is `30` GB. Defaults to `50` GB. + class GceInstance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A set of Compute Engine Shielded instance options. + # @!attribute [rw] enable_secure_boot + # @return [::Boolean] + # Optional. Whether the instance has Secure Boot enabled. + # @!attribute [rw] enable_vtpm + # @return [::Boolean] + # Optional. Whether the instance has the vTPM enabled. + # @!attribute [rw] enable_integrity_monitoring + # @return [::Boolean] + # Optional. Whether the instance has integrity monitoring enabled. + class GceShieldedInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of Compute Engine Confidential VM instance options. + # @!attribute [rw] enable_confidential_compute + # @return [::Boolean] + # Optional. Whether the instance has confidential compute enabled. + class GceConfidentialInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # A directory to persist across workstation sessions. + # @!attribute [rw] gce_pd + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] + # A PersistentDirectory backed by a Compute Engine persistent disk. + # @!attribute [rw] mount_path + # @return [::String] + # Optional. Location of this directory in the running workstation. + class PersistentDirectory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A PersistentDirectory backed by a Compute Engine regional persistent + # disk. The + # {::Google::Cloud::Workstations::V1::WorkstationConfig#persistent_directories persistent_directories} + # field is repeated, but it may contain only one entry. It creates a + # [persistent + # disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that + # mounts to the workstation VM at `/home` when the session starts and + # detaches when the session ends. If this field is empty, workstations + # created with this configuration do not have a persistent home + # directory. + # @!attribute [rw] size_gb + # @return [::Integer] + # Optional. The GB capacity of a persistent home directory for each + # workstation created with this configuration. Must be empty if + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot source_snapshot} + # is set. + # + # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. + # Defaults to `200`. If less than `200` GB, the + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#disk_type disk_type} + # must be + # `"pd-balanced"` or `"pd-ssd"`. + # @!attribute [rw] fs_type + # @return [::String] + # Optional. Type of file system that the disk should be formatted with. + # The workstation image must support this file system type. Must be empty + # if + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot source_snapshot} + # is set. Defaults to `"ext4"`. + # @!attribute [rw] disk_type + # @return [::String] + # Optional. The [type of the persistent + # disk](https://cloud.google.com/compute/docs/disks#disk-types) for the + # home directory. Defaults to `"pd-standard"`. + # @!attribute [rw] source_snapshot + # @return [::String] + # Optional. Name of the snapshot to use as the source for the disk. If + # set, + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#size_gb size_gb} + # and + # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#fs_type fs_type} + # must be empty. + # @!attribute [rw] reclaim_policy + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy] + # Optional. Whether the persistent disk should be deleted when the + # workstation is deleted. Valid values are `DELETE` and `RETAIN`. + # Defaults to `DELETE`. + class GceRegionalPersistentDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value representing what should happen to the disk after the workstation + # is deleted. + module ReclaimPolicy + # Do not use. + RECLAIM_POLICY_UNSPECIFIED = 0 + + # Delete the persistent disk when deleting the workstation. + DELETE = 1 + + # Keep the persistent disk when deleting the workstation. + # An administrator must manually delete the disk. + RETAIN = 2 + end + end + end + + # A Docker container. + # @!attribute [rw] image + # @return [::String] + # Optional. A Docker container image that defines a custom environment. + # + # Cloud Workstations provides a number of + # [preconfigured + # images](https://cloud.google.com/workstations/docs/preconfigured-base-images), + # but you can create your own + # [custom container + # images](https://cloud.google.com/workstations/docs/custom-container-images). + # If using a private image, the `host.gceInstance.serviceAccount` field + # must be specified in the workstation configuration and must have + # permission to pull the specified image. Otherwise, the image must be + # publicly accessible. + # @!attribute [rw] command + # @return [::Array<::String>] + # Optional. If set, overrides the default ENTRYPOINT specified by the + # image. + # @!attribute [rw] args + # @return [::Array<::String>] + # Optional. Arguments passed to the entrypoint. + # @!attribute [rw] env + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Environment variables passed to the container's entrypoint. + # @!attribute [rw] working_dir + # @return [::String] + # Optional. If set, overrides the default DIR specified by the image. + # @!attribute [rw] run_as_user + # @return [::Integer] + # Optional. If set, overrides the USER specified in the image with the + # given uid. + class Container + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class EnvEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A customer-managed encryption key (CMEK) for the Compute Engine + # resources of the associated workstation configuration. Specify the name of + # your Cloud KMS encryption key and the default service account. + # We recommend that you use a separate service account and follow + # [Cloud KMS best + # practices](https://cloud.google.com/kms/docs/separation-of-duties). + # @!attribute [rw] kms_key + # @return [::String] + # Immutable. The name of the Google Cloud KMS encryption key. For example, + # `"projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME"`. + # The key must be in the same region as the workstation configuration. + # @!attribute [rw] kms_key_service_account + # @return [::String] + # Immutable. The service account to use with the specified + # KMS key. We recommend that you use a separate service account + # and follow KMS best practices. For more information, see + # [Separation of + # duties](https://cloud.google.com/kms/docs/separation-of-duties) and + # `gcloud kms keys add-iam-policy-binding` + # [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member). + class CustomerEncryptionKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A readiness check to be performed on a workstation. + # @!attribute [rw] path + # @return [::String] + # Optional. Path to which the request should be sent. + # @!attribute [rw] port + # @return [::Integer] + # Optional. Port to which the request should be sent. + class ReadinessCheck + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A single instance of a developer workstation with its own persistent storage. + # @!attribute [rw] name + # @return [::String] + # Full name of this workstation. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human-readable name for this workstation. + # @!attribute [r] uid + # @return [::String] + # Output only. A system-assigned unique identifier for this workstation. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Indicates whether this workstation is currently being updated + # to match its intended state. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client-specified annotations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. + # [Labels](https://cloud.google.com/workstations/docs/label-resources) that + # are applied to the workstation and that are also propagated to the + # underlying Compute Engine resources. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation was most recently updated. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation was most recently successfully + # started, regardless of the workstation's initial state. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation was soft-deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. Checksum computed by the server. May be sent on update and delete + # requests to make sure that the client has an up-to-date value before + # proceeding. + # @!attribute [r] state + # @return [::Google::Cloud::Workstations::V1::Workstation::State] + # Output only. Current state of the workstation. + # @!attribute [r] host + # @return [::String] + # Output only. Host to which clients can send HTTPS traffic that will be + # received by the workstation. Authorized traffic will be received to the + # workstation as HTTP on port 80. To send traffic to a different port, + # clients may prefix the host with the destination port in the format + # `{port}-{host}`. + class Workstation + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Whether a workstation is running and ready to receive user requests. + module State + # Do not use. + STATE_UNSPECIFIED = 0 + + # The workstation is not yet ready to accept requests from users but will + # be soon. + STATE_STARTING = 1 + + # The workstation is ready to accept requests from users. + STATE_RUNNING = 2 + + # The workstation is being stopped. + STATE_STOPPING = 3 + + # The workstation is stopped and will not be able to receive requests until + # it is started. + STATE_STOPPED = 4 + end + end + + # Request message for GetWorkstationCluster. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested resource. + class GetWorkstationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListWorkstationClusters. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListWorkstationClustersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListWorkstationClusters. + # @!attribute [rw] workstation_clusters + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationCluster>] + # The requested workstation clusters. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. + class ListWorkstationClustersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a CreateWorkstationCluster. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] workstation_cluster_id + # @return [::String] + # Required. ID to use for the workstation cluster. + # @!attribute [rw] workstation_cluster + # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] + # Required. Workstation cluster to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + class CreateWorkstationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateWorkstationCluster. + # @!attribute [rw] workstation_cluster + # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] + # Required. Workstation cluster to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask that specifies which fields in the workstation cluster + # should be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set, and the workstation cluster is not found, a new + # workstation cluster will be created. In this situation, update_mask is + # ignored. + class UpdateWorkstationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a workstation cluster. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation cluster to delete. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation cluster on the server does not have this ETag. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set, any workstation configurations and workstations in the + # workstation cluster are also deleted. Otherwise, the request only + # works if the workstation cluster has no configurations or workstations. + class DeleteWorkstationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetWorkstationConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested resource. + class GetWorkstationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListWorkstationConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListWorkstationConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListWorkstationConfigs. + # @!attribute [rw] workstation_configs + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig>] + # The requested configs. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. + class ListWorkstationConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListUsableWorkstationConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListUsableWorkstationConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListUsableWorkstationConfigs. + # @!attribute [rw] workstation_configs + # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig>] + # The requested configs. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. + class ListUsableWorkstationConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a CreateWorkstationConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] workstation_config_id + # @return [::String] + # Required. ID to use for the workstation configuration. + # @!attribute [rw] workstation_config + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] + # Required. Config to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + class CreateWorkstationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateWorkstationConfig. + # @!attribute [rw] workstation_config + # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] + # Required. Config to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration will be created. In this situation, + # update_mask is ignored. + class UpdateWorkstationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a workstation configuration. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation configuration to delete. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request is rejected if the latest version of the + # workstation configuration on the server does not have this ETag. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set, any workstations in the workstation configuration are + # also deleted. Otherwise, the request works only if the workstation + # configuration has no workstations. + class DeleteWorkstationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetWorkstation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested resource. + class GetWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListWorkstations. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListWorkstationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListWorkstations. + # @!attribute [rw] workstations + # @return [::Array<::Google::Cloud::Workstations::V1::Workstation>] + # The requested workstations. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. 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>] + # Optional. Unreachable resources. + class ListWorkstationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListUsableWorkstations. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListUsableWorkstationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListUsableWorkstations. + # @!attribute [rw] workstations + # @return [::Array<::Google::Cloud::Workstations::V1::Workstation>] + # The requested workstations. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. + class ListUsableWorkstationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a CreateWorkstation. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] workstation_id + # @return [::String] + # Required. ID to use for the workstation. + # @!attribute [rw] workstation + # @return [::Google::Cloud::Workstations::V1::Workstation] + # Required. Workstation to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + class CreateWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateWorkstation. + # @!attribute [rw] workstation + # @return [::Google::Cloud::Workstations::V1::Workstation] + # Required. Workstation to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration is created. In this situation, update_mask + # is ignored. + class UpdateWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteWorkstation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation to delete. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + class DeleteWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for StartWorkstation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation to start. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + class StartWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for StopWorkstation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation to stop. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + class StopWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GenerateAccessToken. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Desired expiration time of the access token. This value must + # be at most 24 hours in the future. If a value is not specified, the + # token's expiration time will be set to a default value of 1 hour in the + # future. + # + # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ttl + # @return [::Google::Protobuf::Duration] + # Desired lifetime duration of the access token. This value must + # be at most 24 hours. If a value is not specified, the token's lifetime + # will be set to a default value of 1 hour. + # + # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] workstation + # @return [::String] + # Required. Name of the workstation for which the access token should be + # generated. + class GenerateAccessTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for GenerateAccessToken. + # @!attribute [rw] access_token + # @return [::String] + # The generated bearer access token. To use this token, include it in an + # Authorization header of an HTTP request sent to the associated + # workstation's hostname—for example, `Authorization: Bearer + # `. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Time at which the generated token will expire. + class GenerateAccessTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for long-running operations. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time that the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time that 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. + # @!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-workstations-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-workstations-v1/snippets/Gemfile new file mode 100644 index 000000000000..a1469457e584 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1", path: "../" +else + gem "google-cloud-workstations-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-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json b/owl-bot-staging/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json new file mode 100644 index 000000000000..e900c252d0bb --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json @@ -0,0 +1,815 @@ +{ + "client_library": { + "name": "google-cloud-workstations-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.workstations.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "workstations_v1_generated_Workstations_GetWorkstationCluster_sync", + "title": "Snippet for the get_workstation_cluster call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_cluster.", + "file": "workstations/get_workstation_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workstation_cluster", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1::WorkstationCluster", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "GetWorkstationCluster", + "full_name": "google.cloud.workstations.v1.Workstations.GetWorkstationCluster", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_ListWorkstationClusters_sync", + "title": "Snippet for the list_workstation_clusters call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_clusters.", + "file": "workstations/list_workstation_clusters.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workstation_clusters", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_clusters", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "ListWorkstationClusters", + "full_name": "google.cloud.workstations.v1.Workstations.ListWorkstationClusters", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_CreateWorkstationCluster_sync", + "title": "Snippet for the create_workstation_cluster call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_cluster.", + "file": "workstations/create_workstation_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workstation_cluster", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "CreateWorkstationCluster", + "full_name": "google.cloud.workstations.v1.Workstations.CreateWorkstationCluster", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_UpdateWorkstationCluster_sync", + "title": "Snippet for the update_workstation_cluster call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_cluster.", + "file": "workstations/update_workstation_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workstation_cluster", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "UpdateWorkstationCluster", + "full_name": "google.cloud.workstations.v1.Workstations.UpdateWorkstationCluster", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_DeleteWorkstationCluster_sync", + "title": "Snippet for the delete_workstation_cluster call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_cluster.", + "file": "workstations/delete_workstation_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workstation_cluster", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "DeleteWorkstationCluster", + "full_name": "google.cloud.workstations.v1.Workstations.DeleteWorkstationCluster", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_GetWorkstationConfig_sync", + "title": "Snippet for the get_workstation_config call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_config.", + "file": "workstations/get_workstation_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workstation_config", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1::WorkstationConfig", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "GetWorkstationConfig", + "full_name": "google.cloud.workstations.v1.Workstations.GetWorkstationConfig", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_ListWorkstationConfigs_sync", + "title": "Snippet for the list_workstation_configs call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_configs.", + "file": "workstations/list_workstation_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workstation_configs", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "ListWorkstationConfigs", + "full_name": "google.cloud.workstations.v1.Workstations.ListWorkstationConfigs", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_ListUsableWorkstationConfigs_sync", + "title": "Snippet for the list_usable_workstation_configs call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstation_configs.", + "file": "workstations/list_usable_workstation_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_usable_workstation_configs", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstation_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "ListUsableWorkstationConfigs", + "full_name": "google.cloud.workstations.v1.Workstations.ListUsableWorkstationConfigs", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_CreateWorkstationConfig_sync", + "title": "Snippet for the create_workstation_config call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_config.", + "file": "workstations/create_workstation_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workstation_config", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "CreateWorkstationConfig", + "full_name": "google.cloud.workstations.v1.Workstations.CreateWorkstationConfig", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_UpdateWorkstationConfig_sync", + "title": "Snippet for the update_workstation_config call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_config.", + "file": "workstations/update_workstation_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workstation_config", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "UpdateWorkstationConfig", + "full_name": "google.cloud.workstations.v1.Workstations.UpdateWorkstationConfig", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_DeleteWorkstationConfig_sync", + "title": "Snippet for the delete_workstation_config call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_config.", + "file": "workstations/delete_workstation_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workstation_config", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "DeleteWorkstationConfig", + "full_name": "google.cloud.workstations.v1.Workstations.DeleteWorkstationConfig", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_GetWorkstation_sync", + "title": "Snippet for the get_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#get_workstation.", + "file": "workstations/get_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workstation", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#get_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::GetWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1::Workstation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "GetWorkstation", + "full_name": "google.cloud.workstations.v1.Workstations.GetWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_ListWorkstations_sync", + "title": "Snippet for the list_workstations call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_workstations.", + "file": "workstations/list_workstations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workstations", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_workstations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::ListWorkstationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1::ListWorkstationsResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "ListWorkstations", + "full_name": "google.cloud.workstations.v1.Workstations.ListWorkstations", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_ListUsableWorkstations_sync", + "title": "Snippet for the list_usable_workstations call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstations.", + "file": "workstations/list_usable_workstations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_usable_workstations", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "ListUsableWorkstations", + "full_name": "google.cloud.workstations.v1.Workstations.ListUsableWorkstations", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_CreateWorkstation_sync", + "title": "Snippet for the create_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#create_workstation.", + "file": "workstations/create_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workstation", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#create_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::CreateWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "CreateWorkstation", + "full_name": "google.cloud.workstations.v1.Workstations.CreateWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_UpdateWorkstation_sync", + "title": "Snippet for the update_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#update_workstation.", + "file": "workstations/update_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workstation", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#update_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::UpdateWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "UpdateWorkstation", + "full_name": "google.cloud.workstations.v1.Workstations.UpdateWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_DeleteWorkstation_sync", + "title": "Snippet for the delete_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation.", + "file": "workstations/delete_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workstation", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::DeleteWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "DeleteWorkstation", + "full_name": "google.cloud.workstations.v1.Workstations.DeleteWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_StartWorkstation_sync", + "title": "Snippet for the start_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#start_workstation.", + "file": "workstations/start_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_workstation", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#start_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::StartWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "StartWorkstation", + "full_name": "google.cloud.workstations.v1.Workstations.StartWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_StopWorkstation_sync", + "title": "Snippet for the stop_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#stop_workstation.", + "file": "workstations/stop_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "stop_workstation", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#stop_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::StopWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "StopWorkstation", + "full_name": "google.cloud.workstations.v1.Workstations.StopWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1_generated_Workstations_GenerateAccessToken_sync", + "title": "Snippet for the generate_access_token call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#generate_access_token.", + "file": "workstations/generate_access_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_access_token", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#generate_access_token", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" + }, + "method": { + "short_name": "GenerateAccessToken", + "full_name": "google.cloud.workstations.v1.Workstations.GenerateAccessToken", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1.Workstations" + } + } + }, + "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-workstations-v1/snippets/workstations/create_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb new file mode 100644 index 000000000000..4031f08e9005 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_CreateWorkstation_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the create_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#create_workstation. +# +def create_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::CreateWorkstationRequest.new + + # Call the create_workstation method. + result = client.create_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_CreateWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb new file mode 100644 index 000000000000..6920a957ca47 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_CreateWorkstationCluster_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the create_workstation_cluster call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_cluster. +# +def create_workstation_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new + + # Call the create_workstation_cluster method. + result = client.create_workstation_cluster request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_CreateWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb new file mode 100644 index 000000000000..a4ee1a5ba3bd --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_CreateWorkstationConfig_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the create_workstation_config call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_config. +# +def create_workstation_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new + + # Call the create_workstation_config method. + result = client.create_workstation_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_CreateWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb new file mode 100644 index 000000000000..81660ff7e383 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_DeleteWorkstation_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the delete_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation. +# +def delete_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new + + # Call the delete_workstation method. + result = client.delete_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_DeleteWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb new file mode 100644 index 000000000000..979c4987b36e --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_DeleteWorkstationCluster_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the delete_workstation_cluster call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_cluster. +# +def delete_workstation_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new + + # Call the delete_workstation_cluster method. + result = client.delete_workstation_cluster request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_DeleteWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb new file mode 100644 index 000000000000..282347e33b9b --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_DeleteWorkstationConfig_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the delete_workstation_config call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_config. +# +def delete_workstation_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new + + # Call the delete_workstation_config method. + result = client.delete_workstation_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_DeleteWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb new file mode 100644 index 000000000000..5ee1e774fee1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_GenerateAccessToken_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the generate_access_token call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#generate_access_token. +# +def generate_access_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new + + # Call the generate_access_token method. + result = client.generate_access_token request + + # The returned object is of type Google::Cloud::Workstations::V1::GenerateAccessTokenResponse. + p result +end +# [END workstations_v1_generated_Workstations_GenerateAccessToken_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb new file mode 100644 index 000000000000..3f39180ba50d --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_GetWorkstation_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the get_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#get_workstation. +# +def get_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::GetWorkstationRequest.new + + # Call the get_workstation method. + result = client.get_workstation request + + # The returned object is of type Google::Cloud::Workstations::V1::Workstation. + p result +end +# [END workstations_v1_generated_Workstations_GetWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb new file mode 100644 index 000000000000..439839d2c17f --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_GetWorkstationCluster_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the get_workstation_cluster call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_cluster. +# +def get_workstation_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new + + # Call the get_workstation_cluster method. + result = client.get_workstation_cluster request + + # The returned object is of type Google::Cloud::Workstations::V1::WorkstationCluster. + p result +end +# [END workstations_v1_generated_Workstations_GetWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb new file mode 100644 index 000000000000..03403b54417f --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_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 workstations_v1_generated_Workstations_GetWorkstationConfig_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the get_workstation_config call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_config. +# +def get_workstation_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new + + # Call the get_workstation_config method. + result = client.get_workstation_config request + + # The returned object is of type Google::Cloud::Workstations::V1::WorkstationConfig. + p result +end +# [END workstations_v1_generated_Workstations_GetWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb new file mode 100644 index 000000000000..b829c05c865c --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_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 workstations_v1_generated_Workstations_ListUsableWorkstationConfigs_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the list_usable_workstation_configs call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstation_configs. +# +def list_usable_workstation_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new + + # Call the list_usable_workstation_configs method. + result = client.list_usable_workstation_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::Workstations::V1::WorkstationConfig. + p item + end +end +# [END workstations_v1_generated_Workstations_ListUsableWorkstationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb new file mode 100644 index 000000000000..d7266f51ca88 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_ListUsableWorkstations_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the list_usable_workstations call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstations. +# +def list_usable_workstations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new + + # Call the list_usable_workstations method. + result = client.list_usable_workstations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. + p item + end +end +# [END workstations_v1_generated_Workstations_ListUsableWorkstations_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb new file mode 100644 index 000000000000..4234e04c9aee --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_ListWorkstationClusters_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the list_workstation_clusters call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_clusters. +# +def list_workstation_clusters + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new + + # Call the list_workstation_clusters method. + result = client.list_workstation_clusters request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Workstations::V1::WorkstationCluster. + p item + end +end +# [END workstations_v1_generated_Workstations_ListWorkstationClusters_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb new file mode 100644 index 000000000000..8810eb261cd2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_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 workstations_v1_generated_Workstations_ListWorkstationConfigs_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the list_workstation_configs call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_configs. +# +def list_workstation_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new + + # Call the list_workstation_configs method. + result = client.list_workstation_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::Workstations::V1::WorkstationConfig. + p item + end +end +# [END workstations_v1_generated_Workstations_ListWorkstationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb new file mode 100644 index 000000000000..f667c3ea7346 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_ListWorkstations_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the list_workstations call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#list_workstations. +# +def list_workstations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::ListWorkstationsRequest.new + + # Call the list_workstations method. + result = client.list_workstations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. + p item + end +end +# [END workstations_v1_generated_Workstations_ListWorkstations_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb new file mode 100644 index 000000000000..8e9f7ff1738c --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_StartWorkstation_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the start_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#start_workstation. +# +def start_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::StartWorkstationRequest.new + + # Call the start_workstation method. + result = client.start_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_StartWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb new file mode 100644 index 000000000000..938fb5a5843f --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_StopWorkstation_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the stop_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#stop_workstation. +# +def stop_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::StopWorkstationRequest.new + + # Call the stop_workstation method. + result = client.stop_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_StopWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb new file mode 100644 index 000000000000..7b34ea13f4bb --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_UpdateWorkstation_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the update_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#update_workstation. +# +def update_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new + + # Call the update_workstation method. + result = client.update_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_UpdateWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb new file mode 100644 index 000000000000..b2c9b129aa80 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_UpdateWorkstationCluster_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the update_workstation_cluster call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_cluster. +# +def update_workstation_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new + + # Call the update_workstation_cluster method. + result = client.update_workstation_cluster request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_UpdateWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb new file mode 100644 index 000000000000..f2129ee535ec --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1_generated_Workstations_UpdateWorkstationConfig_sync] +require "google/cloud/workstations/v1" + +## +# Snippet for the update_workstation_config call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_config. +# +def update_workstation_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new + + # Call the update_workstation_config method. + result = client.update_workstation_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1_generated_Workstations_UpdateWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb new file mode 100644 index 000000000000..c0aa5969d1f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_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/workstations/v1/workstations_pb" +require "google/cloud/workstations/v1/workstations_services_pb" +require "google/cloud/workstations/v1/workstations" + +class ::Google::Cloud::Workstations::V1::Workstations::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Workstations::V1::Workstations::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::Workstations::V1::Workstations::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb new file mode 100644 index 000000000000..2411b91ff053 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_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/workstations/v1/workstations" + +class ::Google::Cloud::Workstations::V1::Workstations::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::Workstations::V1::Workstations::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_workstation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workstation_path project: "value0", location: "value1", workstation_cluster: "value2", workstation_config: "value3", workstation: "value4" + assert_equal "projects/value0/locations/value1/workstationClusters/value2/workstationConfigs/value3/workstations/value4", path + end + end + + def test_workstation_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::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workstation_cluster_path project: "value0", location: "value1", workstation_cluster: "value2" + assert_equal "projects/value0/locations/value1/workstationClusters/value2", path + end + end + + def test_workstation_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::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workstation_config_path project: "value0", location: "value1", workstation_cluster: "value2", workstation_config: "value3" + assert_equal "projects/value0/locations/value1/workstationClusters/value2/workstationConfigs/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb new file mode 100644 index 000000000000..3ac48d97c0c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb @@ -0,0 +1,1220 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/workstations/v1/workstations_pb" +require "google/cloud/workstations/v1/workstations/rest" + + +class ::Google::Cloud::Workstations::V1::Workstations::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_workstation_cluster + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1::WorkstationCluster.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workstation_cluster({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workstation_cluster name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workstation_cluster ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workstation_cluster({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workstation_cluster(::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workstation_cluster_client_stub.call_count + end + end + end + + def test_list_workstation_clusters + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse.new + http_response = OpenStruct.new 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_workstation_clusters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_workstation_clusters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workstation_clusters_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.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_workstation_clusters_client_stub.call_count + end + end + end + + def test_create_workstation_cluster + # Create test objects. + 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" + workstation_cluster_id = "hello world" + workstation_cluster = {} + validate_only = true + + create_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workstation_cluster parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workstation_cluster ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workstation_cluster(::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workstation_cluster_client_stub.call_count + end + end + end + + def test_update_workstation_cluster + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workstation_cluster = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workstation_cluster workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workstation_cluster ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workstation_cluster(::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workstation_cluster_client_stub.call_count + end + end + end + + def test_delete_workstation_cluster + # Create test objects. + 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" + validate_only = true + etag = "hello world" + force = true + + delete_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workstation_cluster name: name, validate_only: validate_only, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workstation_cluster ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workstation_cluster(::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workstation_cluster_client_stub.call_count + end + end + end + + def test_get_workstation_config + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1::WorkstationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workstation_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workstation_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workstation_config ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workstation_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workstation_config(::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workstation_config_client_stub.call_count + end + end + end + + def test_list_workstation_configs + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse.new + http_response = OpenStruct.new 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_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_workstation_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workstation_configs_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.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_workstation_configs_client_stub.call_count + end + end + end + + def test_list_usable_workstation_configs + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse.new + http_response = OpenStruct.new 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_usable_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_usable_workstation_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_usable_workstation_configs_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_usable_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_usable_workstation_configs ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_usable_workstation_configs(::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.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_usable_workstation_configs_client_stub.call_count + end + end + end + + def test_create_workstation_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workstation_config_id = "hello world" + workstation_config = {} + validate_only = true + + create_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workstation_config parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workstation_config ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workstation_config(::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workstation_config_client_stub.call_count + end + end + end + + def test_update_workstation_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workstation_config = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workstation_config workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workstation_config ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workstation_config(::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workstation_config_client_stub.call_count + end + end + end + + def test_delete_workstation_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workstation_config name: name, validate_only: validate_only, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workstation_config ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workstation_config(::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workstation_config_client_stub.call_count + end + end + end + + def test_get_workstation + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1::Workstation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workstation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workstation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workstation ::Google::Cloud::Workstations::V1::GetWorkstationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workstation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workstation(::Google::Cloud::Workstations::V1::GetWorkstationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workstation_client_stub.call_count + end + end + end + + def test_list_workstations + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1::ListWorkstationsResponse.new + http_response = OpenStruct.new 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_workstations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_workstations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workstations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workstations parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.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_workstations_client_stub.call_count + end + end + end + + def test_list_usable_workstations + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse.new + http_response = OpenStruct.new 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_usable_workstations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_usable_workstations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_usable_workstations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_usable_workstations parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_usable_workstations ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_usable_workstations(::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.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_usable_workstations_client_stub.call_count + end + end + end + + def test_create_workstation + # Create test objects. + 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" + workstation_id = "hello world" + workstation = {} + validate_only = true + + create_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workstation parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workstation ::Google::Cloud::Workstations::V1::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workstation(::Google::Cloud::Workstations::V1::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workstation_client_stub.call_count + end + end + end + + def test_update_workstation + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workstation = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workstation({ workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workstation workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workstation ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workstation({ workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workstation(::Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workstation_client_stub.call_count + end + end + end + + def test_delete_workstation + # Create test objects. + 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" + validate_only = true + etag = "hello world" + + delete_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workstation ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workstation(::Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workstation_client_stub.call_count + end + end + end + + def test_start_workstation + # Create test objects. + 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" + validate_only = true + etag = "hello world" + + start_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_start_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_workstation_client_stub.call_count + end + end + end + + def test_stop_workstation + # Create test objects. + 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" + validate_only = true + etag = "hello world" + + stop_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_stop_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stop_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.stop_workstation ::Google::Cloud::Workstations::V1::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.stop_workstation(::Google::Cloud::Workstations::V1::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, stop_workstation_client_stub.call_count + end + end + end + + def test_generate_access_token + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + expire_time = {} + workstation = "hello world" + + generate_access_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_generate_access_token_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_access_token_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_access_token({ expire_time: expire_time, workstation: workstation }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_access_token expire_time: expire_time, workstation: workstation do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_access_token({ expire_time: expire_time, workstation: workstation }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_access_token_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::Workstations::V1::Workstations::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::Workstations::V1::Workstations::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb new file mode 100644 index 000000000000..18791d244c13 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb @@ -0,0 +1,1441 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/workstations/v1/workstations_pb" +require "google/cloud/workstations/v1/workstations" + +class ::Google::Cloud::Workstations::V1::Workstations::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_workstation_cluster + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1::WorkstationCluster.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workstation_cluster, name + assert_kind_of ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workstation_cluster({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workstation_cluster name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workstation_cluster ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workstation_cluster({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workstation_cluster(::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workstation_cluster_client_stub.call_rpc_count + end + end + + def test_list_workstation_clusters + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstation_clusters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workstation_clusters, name + assert_kind_of ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest, 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_workstation_clusters_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.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_workstation_clusters_client_stub.call_rpc_count + end + end + + def test_create_workstation_cluster + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workstation_cluster_id = "hello world" + workstation_cluster = {} + validate_only = true + + create_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workstation_cluster, name + assert_kind_of ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["workstation_cluster_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::WorkstationCluster), request["workstation_cluster"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workstation_cluster parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workstation_cluster ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workstation_cluster(::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, 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_workstation_cluster_client_stub.call_rpc_count + end + end + + def test_update_workstation_cluster + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workstation_cluster = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workstation_cluster, name + assert_kind_of ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::WorkstationCluster), request["workstation_cluster"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, 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 + client.update_workstation_cluster workstation_cluster: workstation_cluster, update_mask: update_mask, 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 + client.update_workstation_cluster ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, 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 + client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, 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 + client.update_workstation_cluster(::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, 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_workstation_cluster_client_stub.call_rpc_count + end + end + + def test_delete_workstation_cluster + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workstation_cluster, name + assert_kind_of ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workstation_cluster name: name, validate_only: validate_only, etag: etag, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workstation_cluster ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workstation_cluster(::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, 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_workstation_cluster_client_stub.call_rpc_count + end + end + + def test_get_workstation_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1::WorkstationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workstation_config, name + assert_kind_of ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workstation_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workstation_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workstation_config ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workstation_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workstation_config(::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workstation_config_client_stub.call_rpc_count + end + end + + def test_list_workstation_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstation_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workstation_configs, name + assert_kind_of ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest, 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_workstation_configs_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.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_workstation_configs_client_stub.call_rpc_count + end + end + + def test_list_usable_workstation_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_usable_workstation_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_usable_workstation_configs, name + assert_kind_of ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest, 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_usable_workstation_configs_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_usable_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_usable_workstation_configs ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_usable_workstation_configs(::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.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_usable_workstation_configs_client_stub.call_rpc_count + end + end + + def test_create_workstation_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workstation_config_id = "hello world" + workstation_config = {} + validate_only = true + + create_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workstation_config, name + assert_kind_of ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["workstation_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::WorkstationConfig), request["workstation_config"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workstation_config parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workstation_config ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workstation_config(::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_workstation_config_client_stub.call_rpc_count + end + end + + def test_update_workstation_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workstation_config = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workstation_config, name + assert_kind_of ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::WorkstationConfig), request["workstation_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, 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 + client.update_workstation_config workstation_config: workstation_config, update_mask: update_mask, 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 + client.update_workstation_config ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, 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 + client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, 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 + client.update_workstation_config(::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, 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_workstation_config_client_stub.call_rpc_count + end + end + + def test_delete_workstation_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workstation_config, name + assert_kind_of ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workstation_config name: name, validate_only: validate_only, etag: etag, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workstation_config ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workstation_config(::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, 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_workstation_config_client_stub.call_rpc_count + end + end + + def test_get_workstation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1::Workstation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1::GetWorkstationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workstation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workstation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workstation ::Google::Cloud::Workstations::V1::GetWorkstationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workstation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workstation(::Google::Cloud::Workstations::V1::GetWorkstationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workstation_client_stub.call_rpc_count + end + end + + def test_list_workstations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1::ListWorkstationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workstations, name + assert_kind_of ::Google::Cloud::Workstations::V1::ListWorkstationsRequest, 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_workstations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workstations parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.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_workstations_client_stub.call_rpc_count + end + end + + def test_list_usable_workstations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_usable_workstations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_usable_workstations, name + assert_kind_of ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest, 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_usable_workstations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_usable_workstations parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_usable_workstations ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_usable_workstations(::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.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_usable_workstations_client_stub.call_rpc_count + end + end + + def test_create_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workstation_id = "hello world" + workstation = {} + validate_only = true + + create_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1::CreateWorkstationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["workstation_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::Workstation), request["workstation"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workstation parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workstation ::Google::Cloud::Workstations::V1::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workstation(::Google::Cloud::Workstations::V1::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, 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_workstation_client_stub.call_rpc_count + end + end + + def test_update_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workstation = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::Workstation), request["workstation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workstation({ workstation: workstation, update_mask: update_mask, 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 + client.update_workstation workstation: workstation, update_mask: update_mask, 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 + client.update_workstation ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, 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 + client.update_workstation({ workstation: workstation, update_mask: update_mask, 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 + client.update_workstation(::Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, 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_workstation_client_stub.call_rpc_count + end + end + + def test_delete_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + + delete_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workstation ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workstation(::Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_workstation_client_stub.call_rpc_count + end + end + + def test_start_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + + start_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1::StartWorkstationRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_workstation_client_stub.call_rpc_count + end + end + + def test_stop_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + + stop_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :stop_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1::StopWorkstationRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stop_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.stop_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.stop_workstation ::Google::Cloud::Workstations::V1::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.stop_workstation(::Google::Cloud::Workstations::V1::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, stop_workstation_client_stub.call_rpc_count + end + end + + def test_generate_access_token + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + expire_time = {} + workstation = "hello world" + + generate_access_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_access_token, name + assert_kind_of ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["expire_time"] + assert_equal :expire_time, request.expiration + assert_equal "hello world", request["workstation"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_access_token_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_access_token({ expire_time: expire_time, workstation: workstation }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_access_token expire_time: expire_time, workstation: workstation do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_access_token({ expire_time: expire_time, workstation: workstation }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_access_token_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::Workstations::V1::Workstations::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::Workstations::V1::Workstations::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::Workstations::V1::Workstations::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Workstations::V1::Workstations::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::Workstations::V1::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Workstations::V1::Workstations::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/helper.rb b/owl-bot-staging/google-cloud-workstations-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore b/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-workstations-v1beta/.repo-metadata.json new file mode 100644 index 000000000000..1f075089291e --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "workstations.googleapis.com", + "api_shortname": "workstations", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest", + "distribution_name": "google-cloud-workstations-v1beta", + "is_cloud": true, + "language": "ruby", + "name": "workstations", + "name_pretty": "Cloud Workstations V1BETA API", + "product_documentation": "https://cloud.google.com/workstations/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Allows administrators to create managed developer environments in the cloud. Note that google-cloud-workstations-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workstations instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/workstations/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-workstations-v1beta/.rubocop.yml new file mode 100644 index 000000000000..7ef831857790 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workstations-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-workstations-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.toys.rb b/owl-bot-staging/google-cloud-workstations-v1beta/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/.yardopts b/owl-bot-staging/google-cloud-workstations-v1beta/.yardopts new file mode 100644 index 000000000000..760a9a0f14a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Workstations 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-workstations-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workstations-v1beta/AUTHENTICATION.md new file mode 100644 index 000000000000..31c9da61967d --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workstations-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-workstations-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/workstations/v1beta" + +client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workstations/v1beta" + +::Google::Cloud::Workstations::V1beta::Workstations::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Workstations::V1beta::Workstations::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-workstations-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/workstations/v1beta" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Workstations::V1beta::Workstations::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-workstations-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-workstations-v1beta/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/Gemfile b/owl-bot-staging/google-cloud-workstations-v1beta/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-workstations-v1beta/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/README.md b/owl-bot-staging/google-cloud-workstations-v1beta/README.md new file mode 100644 index 000000000000..97a3e0b962f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/README.md @@ -0,0 +1,153 @@ +# Ruby Client for the Cloud Workstations V1BETA API + +Allows administrators to create managed developer environments in the 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 Cloud Workstations V1BETA API. Most users should consider using +the main client gem, +[google-cloud-workstations](https://rubygems.org/gems/google-cloud-workstations). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-workstations-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/workstations.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/workstations/v1beta" + +client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new +request = ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new # (request fields as keyword arguments...) +response = client.get_workstation_cluster request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/workstations/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/workstations/v1beta" +require "logger" + +client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workstations`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workstations-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-workstations`. +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-workstations-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-workstations-v1beta/Rakefile b/owl-bot-staging/google-cloud-workstations-v1beta/Rakefile new file mode 100644 index 000000000000..19a6e40ad1cb --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-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/workstations/v1beta/workstations/credentials" + ::Google::Cloud::Workstations::V1beta::Workstations::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-workstations-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-workstations-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-workstations-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-workstations-v1beta gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workstations-v1beta" + header "google-cloud-workstations-v1beta rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workstations-v1beta yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workstations-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-workstations-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-workstations-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-workstations-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-workstations-v1beta/gapic_metadata.json new file mode 100644 index 000000000000..f14a54eb9f14 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/gapic_metadata.json @@ -0,0 +1,118 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.workstations.v1beta", + "libraryPackage": "::Google::Cloud::Workstations::V1beta", + "services": { + "Workstations": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Workstations::V1beta::Workstations::Client", + "rpcs": { + "GetWorkstationCluster": { + "methods": [ + "get_workstation_cluster" + ] + }, + "ListWorkstationClusters": { + "methods": [ + "list_workstation_clusters" + ] + }, + "CreateWorkstationCluster": { + "methods": [ + "create_workstation_cluster" + ] + }, + "UpdateWorkstationCluster": { + "methods": [ + "update_workstation_cluster" + ] + }, + "DeleteWorkstationCluster": { + "methods": [ + "delete_workstation_cluster" + ] + }, + "GetWorkstationConfig": { + "methods": [ + "get_workstation_config" + ] + }, + "ListWorkstationConfigs": { + "methods": [ + "list_workstation_configs" + ] + }, + "ListUsableWorkstationConfigs": { + "methods": [ + "list_usable_workstation_configs" + ] + }, + "CreateWorkstationConfig": { + "methods": [ + "create_workstation_config" + ] + }, + "UpdateWorkstationConfig": { + "methods": [ + "update_workstation_config" + ] + }, + "DeleteWorkstationConfig": { + "methods": [ + "delete_workstation_config" + ] + }, + "GetWorkstation": { + "methods": [ + "get_workstation" + ] + }, + "ListWorkstations": { + "methods": [ + "list_workstations" + ] + }, + "ListUsableWorkstations": { + "methods": [ + "list_usable_workstations" + ] + }, + "CreateWorkstation": { + "methods": [ + "create_workstation" + ] + }, + "UpdateWorkstation": { + "methods": [ + "update_workstation" + ] + }, + "DeleteWorkstation": { + "methods": [ + "delete_workstation" + ] + }, + "StartWorkstation": { + "methods": [ + "start_workstation" + ] + }, + "StopWorkstation": { + "methods": [ + "stop_workstation" + ] + }, + "GenerateAccessToken": { + "methods": [ + "generate_access_token" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/google-cloud-workstations-v1beta.gemspec b/owl-bot-staging/google-cloud-workstations-v1beta/google-cloud-workstations-v1beta.gemspec new file mode 100644 index 000000000000..ba0788c51019 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/google-cloud-workstations-v1beta.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workstations/v1beta/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workstations-v1beta" + gem.version = Google::Cloud::Workstations::V1beta::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Allows administrators to create managed developer environments in the cloud. Note that google-cloud-workstations-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workstations instead. See the readme for more details." + gem.summary = "Allows administrators to create managed developer environments in the cloud." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" + gem.add_dependency "google-iam-v1", "~> 1.3" +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb new file mode 100644 index 000000000000..a0188c280162 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google-cloud-workstations-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/workstations/v1beta" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb new file mode 100644 index 000000000000..c7ef63fc2912 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/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/workstations/v1beta/workstations" +require "google/cloud/workstations/v1beta/version" + +module Google + module Cloud + module Workstations + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/workstations/v1beta" + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/workstations/v1beta" + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + module V1beta + end + end + end +end + +helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" +require "google/cloud/workstations/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb new file mode 100644 index 000000000000..2b52965b4f26 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb @@ -0,0 +1,110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/rest" + +module Google + module Cloud + module Workstations + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/workstations/v1beta/rest" + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + module V1beta + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workstations"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + + default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config + default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1beta/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1beta/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1beta/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1beta/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1beta/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb new file mode 100644 index 000000000000..80bc9428e548 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/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/workstations/v1beta/workstations/rest" +require "google/cloud/workstations/v1beta/bindings_override" +require "google/cloud/workstations/v1beta/version" + +module Google + module Cloud + module Workstations + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/workstations/v1beta/rest" + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + module V1beta + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb new file mode 100644 index 000000000000..4f71d3f1ee75 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/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 Workstations + module V1beta + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb new file mode 100644 index 000000000000..b0c7dfb12bbf --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.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/workstations/v1beta/version" + +require "google/cloud/workstations/v1beta/workstations/credentials" +require "google/cloud/workstations/v1beta/workstations/paths" +require "google/cloud/workstations/v1beta/workstations/operations" +require "google/cloud/workstations/v1beta/workstations/client" +require "google/cloud/workstations/v1beta/workstations/rest" + +module Google + module Cloud + module Workstations + module V1beta + ## + # Service for interacting with Cloud Workstations. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/workstations/v1beta/workstations" + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/workstations/v1beta/workstations/rest" + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + module Workstations + end + end + end + end +end + +helper_path = ::File.join __dir__, "workstations", "helpers.rb" +require "google/cloud/workstations/v1beta/workstations/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb new file mode 100644 index 000000000000..0921d9287c0a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb @@ -0,0 +1,2595 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/workstations/v1beta/workstations_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Workstations + module V1beta + module Workstations + ## + # Client for the Workstations service. + # + # Service for interacting with Cloud Workstations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workstations_stub + + ## + # Configure the Workstations Client class. + # + # See {::Google::Cloud::Workstations::V1beta::Workstations::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Workstations clients + # ::Google::Cloud::Workstations::V1beta::Workstations::Client.configure do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Workstations", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_workstation_cluster.timeout = 60.0 + default_config.rpcs.get_workstation_cluster.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstation_clusters.timeout = 60.0 + default_config.rpcs.list_workstation_clusters.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation_cluster.timeout = 60.0 + + default_config.rpcs.update_workstation_cluster.timeout = 60.0 + + default_config.rpcs.delete_workstation_cluster.timeout = 60.0 + + default_config.rpcs.get_workstation_config.timeout = 60.0 + default_config.rpcs.get_workstation_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstation_configs.timeout = 60.0 + default_config.rpcs.list_workstation_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_usable_workstation_configs.timeout = 60.0 + default_config.rpcs.list_usable_workstation_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation_config.timeout = 60.0 + + default_config.rpcs.update_workstation_config.timeout = 60.0 + + default_config.rpcs.delete_workstation_config.timeout = 60.0 + + default_config.rpcs.get_workstation.timeout = 60.0 + default_config.rpcs.get_workstation.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstations.timeout = 60.0 + default_config.rpcs.list_workstations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_usable_workstations.timeout = 60.0 + default_config.rpcs.list_usable_workstations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation.timeout = 60.0 + + default_config.rpcs.update_workstation.timeout = 60.0 + + default_config.rpcs.delete_workstation.timeout = 60.0 + + default_config.rpcs.start_workstation.timeout = 60.0 + + default_config.rpcs.stop_workstation.timeout = 60.0 + + default_config.rpcs.generate_access_token.timeout = 60.0 + default_config.rpcs.generate_access_token.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 Workstations Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workstations::V1beta::Workstations::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam config [Client::Configuration] + # + # @return [Client::Configuration] + # + def configure + yield @config if block_given? + @config + end + + ## + # The effective universe domain + # + # @return [String] + # + def universe_domain + @workstations_stub.universe_domain + end + + ## + # Create a new Workstations client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Workstations 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/workstations/v1beta/workstations_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 + + @workstations_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Workstations::V1beta::Workstations::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 + ) + + @workstations_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 = @workstations_stub.endpoint + config.universe_domain = @workstations_stub.universe_domain + config.logger = @workstations_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 = @workstations_stub.endpoint + config.universe_domain = @workstations_stub.universe_domain + config.logger = @workstations_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Workstations::V1beta::Workstations::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 + @workstations_stub.logger + end + + # Service calls + + ## + # Returns the requested workstation cluster. + # + # @overload get_workstation_cluster(request, options = nil) + # Pass arguments to `get_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workstation_cluster(name: nil) + # Pass arguments to `get_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workstations::V1beta::WorkstationCluster] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new + # + # # Call the get_workstation_cluster method. + # result = client.get_workstation_cluster request + # + # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationCluster. + # p result + # + def get_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :get_workstation_cluster, request, 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 all workstation clusters in the specified location. + # + # @overload list_workstation_clusters(request, options = nil) + # Pass arguments to `list_workstation_clusters` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workstation_clusters(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstation_clusters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::WorkstationCluster>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationCluster>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new + # + # # Call the list_workstation_clusters method. + # result = client.list_workstation_clusters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1beta::WorkstationCluster. + # p item + # end + # + def list_workstation_clusters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workstation_clusters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation_clusters.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workstation_clusters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_workstation_clusters, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_clusters, request, response, 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 workstation cluster. + # + # @overload create_workstation_cluster(request, options = nil) + # Pass arguments to `create_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) + # Pass arguments to `create_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param workstation_cluster_id [::String] + # Required. ID to use for the workstation cluster. + # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash] + # Required. Workstation cluster to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new + # + # # Call the create_workstation_cluster method. + # result = client.create_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :create_workstation_cluster, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 workstation cluster. + # + # @overload update_workstation_cluster(request, options = nil) + # Pass arguments to `update_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash] + # Required. Workstation cluster to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask that specifies which fields in the workstation cluster + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set, and the workstation cluster is not found, a new + # workstation cluster will be created. In this situation, update_mask is + # ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new + # + # # Call the update_workstation_cluster method. + # result = client.update_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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.workstation_cluster&.name + header_params["workstation_cluster.name"] = request.workstation_cluster.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_workstation_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :update_workstation_cluster, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified workstation cluster. + # + # @overload delete_workstation_cluster(request, options = nil) + # Pass arguments to `delete_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation cluster to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation cluster on the server does not have this ETag. + # @param force [::Boolean] + # Optional. If set, any workstation configurations and workstations in the + # workstation cluster are also deleted. Otherwise, the request only + # works if the workstation cluster has no configurations or workstations. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new + # + # # Call the delete_workstation_cluster method. + # result = client.delete_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :delete_workstation_cluster, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested workstation configuration. + # + # @overload get_workstation_config(request, options = nil) + # Pass arguments to `get_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workstation_config(name: nil) + # Pass arguments to `get_workstation_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 requested resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workstations::V1beta::WorkstationConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new + # + # # Call the get_workstation_config method. + # result = client.get_workstation_config request + # + # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationConfig. + # p result + # + def get_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workstation_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::Workstations::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_workstation_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :get_workstation_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 all workstation configurations in the specified cluster. + # + # @overload list_workstation_configs(request, options = nil) + # Pass arguments to `list_workstation_configs` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workstation_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstation_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. Parent resource name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::WorkstationConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new + # + # # Call the list_workstation_configs method. + # result = client.list_workstation_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::Workstations::V1beta::WorkstationConfig. + # p item + # end + # + def list_workstation_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workstation_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::Workstations::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_workstation_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workstation_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_workstation_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_configs, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all workstation configurations in the specified cluster on which + # the caller has the "workstations.workstation.create" permission. + # + # @overload list_usable_workstation_configs(request, options = nil) + # Pass arguments to `list_usable_workstation_configs` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_usable_workstation_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. Parent resource name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::WorkstationConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new + # + # # Call the list_usable_workstation_configs method. + # result = client.list_usable_workstation_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::Workstations::V1beta::WorkstationConfig. + # p item + # end + # + def list_usable_workstation_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_usable_workstation_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::Workstations::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_usable_workstation_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_usable_workstation_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_usable_workstation_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstation_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 a new workstation configuration. + # + # @overload create_workstation_config(request, options = nil) + # Pass arguments to `create_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) + # Pass arguments to `create_workstation_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. Parent resource name. + # @param workstation_config_id [::String] + # Required. ID to use for the workstation configuration. + # @param workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash] + # Required. Config to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new + # + # # Call the create_workstation_config method. + # result = client.create_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_workstation_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::Workstations::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_workstation_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :create_workstation_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing workstation configuration. + # + # @overload update_workstation_config(request, options = nil) + # Pass arguments to `update_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation_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 workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash] + # Required. Config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration will be created. In this situation, + # update_mask is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new + # + # # Call the update_workstation_config method. + # result = client.update_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_workstation_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::Workstations::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.workstation_config&.name + header_params["workstation_config.name"] = request.workstation_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_workstation_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :update_workstation_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified workstation configuration. + # + # @overload delete_workstation_config(request, options = nil) + # Pass arguments to `delete_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_workstation_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 workstation configuration to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request is rejected if the latest version of the + # workstation configuration on the server does not have this ETag. + # @param force [::Boolean] + # Optional. If set, any workstations in the workstation configuration are + # also deleted. Otherwise, the request works only if the workstation + # configuration has no workstations. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new + # + # # Call the delete_workstation_config method. + # result = client.delete_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_workstation_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::Workstations::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_workstation_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :delete_workstation_config, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested workstation. + # + # @overload get_workstation(request, options = nil) + # Pass arguments to `get_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::GetWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_workstation(name: nil) + # Pass arguments to `get_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workstations::V1beta::Workstation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workstations::V1beta::Workstation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new + # + # # Call the get_workstation method. + # result = client.get_workstation request + # + # # The returned object is of type Google::Cloud::Workstations::V1beta::Workstation. + # p result + # + def get_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.get_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :get_workstation, request, 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 all Workstations using the specified workstation configuration. + # + # @overload list_workstations(request, options = nil) + # Pass arguments to `list_workstations` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_workstations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::Workstation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new + # + # # Call the list_workstations method. + # result = client.list_workstations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. + # p item + # end + # + def list_workstations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_workstations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_workstations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_workstations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstations, request, response, 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 all workstations using the specified workstation configuration + # on which the caller has the "workstations.workstations.use" permission. + # + # @overload list_usable_workstations(request, options = nil) + # Pass arguments to `list_usable_workstations` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_usable_workstations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_usable_workstations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::Workstation>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new + # + # # Call the list_usable_workstations method. + # result = client.list_usable_workstations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. + # p item + # end + # + def list_usable_workstations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.list_usable_workstations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_usable_workstations.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_usable_workstations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :list_usable_workstations, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstations, request, response, 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 workstation. + # + # @overload create_workstation(request, options = nil) + # Pass arguments to `create_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) + # Pass arguments to `create_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param workstation_id [::String] + # Required. ID to use for the workstation. + # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash] + # Required. Workstation to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new + # + # # Call the create_workstation method. + # result = client.create_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.create_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :create_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 workstation. + # + # @overload update_workstation(request, options = nil) + # Pass arguments to `update_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash] + # Required. Workstation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration is created. In this situation, update_mask + # is ignored. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new + # + # # Call the update_workstation method. + # result = client.update_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.update_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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.workstation&.name + header_params["workstation.name"] = request.workstation.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.update_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :update_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified workstation. + # + # @overload delete_workstation(request, options = nil) + # Pass arguments to `delete_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new + # + # # Call the delete_workstation method. + # result = client.delete_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.delete_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :delete_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, 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 running a workstation so that users can connect to it. + # + # @overload start_workstation(request, options = nil) + # Pass arguments to `start_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::StartWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::StartWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `start_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to start. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new + # + # # Call the start_workstation method. + # result = client.start_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest + + # Converts hash and nil to 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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.start_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.start_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :start_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stops running a workstation, reducing costs. + # + # @overload stop_workstation(request, options = nil) + # Pass arguments to `stop_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::StopWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::StopWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `stop_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to stop. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::Operation] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new + # + # # Call the stop_workstation method. + # result = client.stop_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest + + # Converts hash and nil to 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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.stop_workstation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.stop_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :stop_workstation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a short-lived credential that can be used to send authenticated and + # authorized traffic to a workstation. + # + # @overload generate_access_token(request, options = nil) + # Pass arguments to `generate_access_token` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_token(expire_time: nil, ttl: nil, workstation: nil) + # Pass arguments to `generate_access_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] + # Desired expiration time of the access token. This value must + # be at most 24 hours in the future. If a value is not specified, the + # token's expiration time will be set to a default value of 1 hour in the + # future. + # + # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. 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 ttl [::Google::Protobuf::Duration, ::Hash] + # Desired lifetime duration of the access token. This value must + # be at most 24 hours. If a value is not specified, the token's lifetime + # will be set to a default value of 1 hour. + # + # Note: The following parameters are mutually exclusive: `ttl`, `expire_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 workstation [::String] + # Required. Name of the workstation for which the access token should be + # generated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new + # + # # Call the generate_access_token method. + # result = client.generate_access_token request + # + # # The returned object is of type Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse. + # p result + # + def generate_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest + + # Converts hash and nil to 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_access_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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.workstation + header_params["workstation"] = request.workstation + end + + request_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_access_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.call_rpc :generate_access_token, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Workstations API. + # + # This class represents the configuration for Workstations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Cloud::Workstations::V1beta::Workstations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # 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_workstation_cluster to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workstations::V1beta::Workstations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_workstation_cluster.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_workstation_cluster.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Workstations::V1beta::Workstations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workstations.googleapis.com" + + config_attr :endpoint, nil, ::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 Workstations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation_cluster + ## + # RPC-specific configuration for `list_workstation_clusters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstation_clusters + ## + # RPC-specific configuration for `create_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation_cluster + ## + # RPC-specific configuration for `update_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation_cluster + ## + # RPC-specific configuration for `delete_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation_cluster + ## + # RPC-specific configuration for `get_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation_config + ## + # RPC-specific configuration for `list_workstation_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstation_configs + ## + # RPC-specific configuration for `list_usable_workstation_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_usable_workstation_configs + ## + # RPC-specific configuration for `create_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation_config + ## + # RPC-specific configuration for `update_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation_config + ## + # RPC-specific configuration for `delete_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation_config + ## + # RPC-specific configuration for `get_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation + ## + # RPC-specific configuration for `list_workstations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstations + ## + # RPC-specific configuration for `list_usable_workstations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_usable_workstations + ## + # RPC-specific configuration for `create_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation + ## + # RPC-specific configuration for `update_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation + ## + # RPC-specific configuration for `delete_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation + ## + # RPC-specific configuration for `start_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :start_workstation + ## + # RPC-specific configuration for `stop_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_workstation + ## + # RPC-specific configuration for `generate_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_access_token + + # @private + def initialize parent_rpcs = nil + get_workstation_cluster_config = parent_rpcs.get_workstation_cluster if parent_rpcs.respond_to? :get_workstation_cluster + @get_workstation_cluster = ::Gapic::Config::Method.new get_workstation_cluster_config + list_workstation_clusters_config = parent_rpcs.list_workstation_clusters if parent_rpcs.respond_to? :list_workstation_clusters + @list_workstation_clusters = ::Gapic::Config::Method.new list_workstation_clusters_config + create_workstation_cluster_config = parent_rpcs.create_workstation_cluster if parent_rpcs.respond_to? :create_workstation_cluster + @create_workstation_cluster = ::Gapic::Config::Method.new create_workstation_cluster_config + update_workstation_cluster_config = parent_rpcs.update_workstation_cluster if parent_rpcs.respond_to? :update_workstation_cluster + @update_workstation_cluster = ::Gapic::Config::Method.new update_workstation_cluster_config + delete_workstation_cluster_config = parent_rpcs.delete_workstation_cluster if parent_rpcs.respond_to? :delete_workstation_cluster + @delete_workstation_cluster = ::Gapic::Config::Method.new delete_workstation_cluster_config + get_workstation_config_config = parent_rpcs.get_workstation_config if parent_rpcs.respond_to? :get_workstation_config + @get_workstation_config = ::Gapic::Config::Method.new get_workstation_config_config + list_workstation_configs_config = parent_rpcs.list_workstation_configs if parent_rpcs.respond_to? :list_workstation_configs + @list_workstation_configs = ::Gapic::Config::Method.new list_workstation_configs_config + list_usable_workstation_configs_config = parent_rpcs.list_usable_workstation_configs if parent_rpcs.respond_to? :list_usable_workstation_configs + @list_usable_workstation_configs = ::Gapic::Config::Method.new list_usable_workstation_configs_config + create_workstation_config_config = parent_rpcs.create_workstation_config if parent_rpcs.respond_to? :create_workstation_config + @create_workstation_config = ::Gapic::Config::Method.new create_workstation_config_config + update_workstation_config_config = parent_rpcs.update_workstation_config if parent_rpcs.respond_to? :update_workstation_config + @update_workstation_config = ::Gapic::Config::Method.new update_workstation_config_config + delete_workstation_config_config = parent_rpcs.delete_workstation_config if parent_rpcs.respond_to? :delete_workstation_config + @delete_workstation_config = ::Gapic::Config::Method.new delete_workstation_config_config + get_workstation_config = parent_rpcs.get_workstation if parent_rpcs.respond_to? :get_workstation + @get_workstation = ::Gapic::Config::Method.new get_workstation_config + list_workstations_config = parent_rpcs.list_workstations if parent_rpcs.respond_to? :list_workstations + @list_workstations = ::Gapic::Config::Method.new list_workstations_config + list_usable_workstations_config = parent_rpcs.list_usable_workstations if parent_rpcs.respond_to? :list_usable_workstations + @list_usable_workstations = ::Gapic::Config::Method.new list_usable_workstations_config + create_workstation_config = parent_rpcs.create_workstation if parent_rpcs.respond_to? :create_workstation + @create_workstation = ::Gapic::Config::Method.new create_workstation_config + update_workstation_config = parent_rpcs.update_workstation if parent_rpcs.respond_to? :update_workstation + @update_workstation = ::Gapic::Config::Method.new update_workstation_config + delete_workstation_config = parent_rpcs.delete_workstation if parent_rpcs.respond_to? :delete_workstation + @delete_workstation = ::Gapic::Config::Method.new delete_workstation_config + start_workstation_config = parent_rpcs.start_workstation if parent_rpcs.respond_to? :start_workstation + @start_workstation = ::Gapic::Config::Method.new start_workstation_config + stop_workstation_config = parent_rpcs.stop_workstation if parent_rpcs.respond_to? :stop_workstation + @stop_workstation = ::Gapic::Config::Method.new stop_workstation_config + generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token + @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb new file mode 100644 index 000000000000..cd1d778b15ef --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/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 Workstations + module V1beta + module Workstations + # Credentials for the Workstations 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-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb new file mode 100644 index 000000000000..59dfe3cc08d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb @@ -0,0 +1,841 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" +require "google/longrunning/operations_pb" + +module Google + module Cloud + module Workstations + module V1beta + module Workstations + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Workstations 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 Workstations 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::Workstations::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::Workstations::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::Workstations::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::Workstations::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::Workstations::V1beta::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, + metadata: metadata, + retry_policy: @config.rpcs.wait_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations API. + # + # This class represents the configuration for Operations, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`GRPC::Core::Channel`) a gRPC channel with included credentials + # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object + # * (`nil`) indicating no credentials + # + # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials + # is deprecated. Providing an unvalidated credential configuration to + # Google APIs can compromise the security of your systems and data. + # + # @example + # + # # The recommended way to provide credentials is to use the `make_creds` method + # # on the appropriate credentials class for your environment. + # + # require "googleauth" + # + # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( + # json_key_io: ::File.open("/path/to/keyfile.json") + # ) + # + # client = ::Google::Longrunning::Operations::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workstations.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) + config_attr :interceptors, nil, ::Array, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration for the channel pool + # @return [::Gapic::ServiceStub::ChannelPool::Configuration] + # + def channel_pool + @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + ## + # RPC-specific configuration for `wait_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :wait_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation + @wait_operation = ::Gapic::Config::Method.new wait_operation_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb new file mode 100644 index 000000000000..651fbc0e8140 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/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 Workstations + module V1beta + module Workstations + # Path helper methods for the Workstations 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 Workstation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}` + # + # @param project [String] + # @param location [String] + # @param workstation_cluster [String] + # @param workstation_config [String] + # @param workstation [String] + # + # @return [::String] + def workstation_path project:, location:, workstation_cluster:, workstation_config:, workstation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "workstation_cluster cannot contain /" if workstation_cluster.to_s.include? "/" + raise ::ArgumentError, "workstation_config cannot contain /" if workstation_config.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}/workstations/#{workstation}" + end + + ## + # Create a fully-qualified WorkstationCluster resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}` + # + # @param project [String] + # @param location [String] + # @param workstation_cluster [String] + # + # @return [::String] + def workstation_cluster_path project:, location:, workstation_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}/workstationClusters/#{workstation_cluster}" + end + + ## + # Create a fully-qualified WorkstationConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}` + # + # @param project [String] + # @param location [String] + # @param workstation_cluster [String] + # @param workstation_config [String] + # + # @return [::String] + def workstation_config_path project:, location:, workstation_cluster:, workstation_config: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "workstation_cluster cannot contain /" if workstation_cluster.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb new file mode 100644 index 000000000000..203469f53bee --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/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/workstations/v1beta/version" +require "google/cloud/workstations/v1beta/bindings_override" + +require "google/cloud/workstations/v1beta/workstations/credentials" +require "google/cloud/workstations/v1beta/workstations/paths" +require "google/cloud/workstations/v1beta/workstations/rest/operations" +require "google/cloud/workstations/v1beta/workstations/rest/client" + +module Google + module Cloud + module Workstations + module V1beta + ## + # Service for interacting with Cloud Workstations. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/workstations/v1beta/workstations/rest" + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + module Workstations + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/workstations/v1beta/workstations/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb new file mode 100644 index 000000000000..914cc70a57bb --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb @@ -0,0 +1,2420 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/workstations/v1beta/workstations_pb" +require "google/cloud/workstations/v1beta/workstations/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Workstations + module V1beta + module Workstations + module Rest + ## + # REST client for the Workstations service. + # + # Service for interacting with Cloud Workstations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :workstations_stub + + ## + # Configure the Workstations Client class. + # + # See {::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Workstations clients + # ::Google::Cloud::Workstations::V1beta::Workstations::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", "Workstations", "V1beta"] + parent_config = while namespace.any? + parent_name = namespace.join "::" + parent_const = const_get parent_name + break parent_const.configure if parent_const.respond_to? :configure + namespace.pop + end + default_config = Client::Configuration.new parent_config + + default_config.rpcs.get_workstation_cluster.timeout = 60.0 + default_config.rpcs.get_workstation_cluster.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstation_clusters.timeout = 60.0 + default_config.rpcs.list_workstation_clusters.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation_cluster.timeout = 60.0 + + default_config.rpcs.update_workstation_cluster.timeout = 60.0 + + default_config.rpcs.delete_workstation_cluster.timeout = 60.0 + + default_config.rpcs.get_workstation_config.timeout = 60.0 + default_config.rpcs.get_workstation_config.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstation_configs.timeout = 60.0 + default_config.rpcs.list_workstation_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_usable_workstation_configs.timeout = 60.0 + default_config.rpcs.list_usable_workstation_configs.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation_config.timeout = 60.0 + + default_config.rpcs.update_workstation_config.timeout = 60.0 + + default_config.rpcs.delete_workstation_config.timeout = 60.0 + + default_config.rpcs.get_workstation.timeout = 60.0 + default_config.rpcs.get_workstation.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_workstations.timeout = 60.0 + default_config.rpcs.list_workstations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_usable_workstations.timeout = 60.0 + default_config.rpcs.list_usable_workstations.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_workstation.timeout = 60.0 + + default_config.rpcs.update_workstation.timeout = 60.0 + + default_config.rpcs.delete_workstation.timeout = 60.0 + + default_config.rpcs.start_workstation.timeout = 60.0 + + default_config.rpcs.stop_workstation.timeout = 60.0 + + default_config.rpcs.generate_access_token.timeout = 60.0 + default_config.rpcs.generate_access_token.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 Workstations Client instance. + # + # The configuration is set to the derived mode, meaning that values can be changed, + # but structural changes (adding new fields, etc.) are not allowed. Structural changes + # should be made on {Client.configure}. + # + # See {::Google::Cloud::Workstations::V1beta::Workstations::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 + @workstations_stub.universe_domain + end + + ## + # Create a new Workstations REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Workstations 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::Workstations::V1beta::Workstations::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 + + @workstations_stub = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @workstations_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 = @workstations_stub.endpoint + config.universe_domain = @workstations_stub.universe_domain + config.logger = @workstations_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 = @workstations_stub.endpoint + config.universe_domain = @workstations_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @workstations_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Workstations::V1beta::Workstations::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 + @workstations_stub.logger + end + + # Service calls + + ## + # Returns the requested workstation cluster. + # + # @overload get_workstation_cluster(request, options = nil) + # Pass arguments to `get_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workstation_cluster(name: nil) + # Pass arguments to `get_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::WorkstationCluster] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new + # + # # Call the get_workstation_cluster method. + # result = client.get_workstation_cluster request + # + # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationCluster. + # p result + # + def get_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.get_workstation_cluster request, 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 all workstation clusters in the specified location. + # + # @overload list_workstation_clusters(request, options = nil) + # Pass arguments to `list_workstation_clusters` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workstation_clusters(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstation_clusters` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::WorkstationCluster>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationCluster>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new + # + # # Call the list_workstation_clusters method. + # result = client.list_workstation_clusters request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1beta::WorkstationCluster. + # p item + # end + # + def list_workstation_clusters request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workstation_clusters.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation_clusters.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workstation_clusters.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_workstation_clusters request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstation_clusters, "workstation_clusters", request, result, 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 workstation cluster. + # + # @overload create_workstation_cluster(request, options = nil) + # Pass arguments to `create_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) + # Pass arguments to `create_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param workstation_cluster_id [::String] + # Required. ID to use for the workstation cluster. + # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash] + # Required. Workstation cluster to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new + # + # # Call the create_workstation_cluster method. + # result = client.create_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest + + # Converts hash and nil to an 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_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.create_workstation_cluster request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation cluster. + # + # @overload update_workstation_cluster(request, options = nil) + # Pass arguments to `update_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash] + # Required. Workstation cluster to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask that specifies which fields in the workstation cluster + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set, and the workstation cluster is not found, a new + # workstation cluster will be created. In this situation, update_mask is + # ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new + # + # # Call the update_workstation_cluster method. + # result = client.update_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workstation_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.update_workstation_cluster request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation cluster. + # + # @overload delete_workstation_cluster(request, options = nil) + # Pass arguments to `delete_workstation_cluster` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_workstation_cluster` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation cluster to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation cluster on the server does not have this ETag. + # @param force [::Boolean] + # Optional. If set, any workstation configurations and workstations in the + # workstation cluster are also deleted. Otherwise, the request only + # works if the workstation cluster has no configurations or workstations. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new + # + # # Call the delete_workstation_cluster method. + # result = client.delete_workstation_cluster request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation_cluster request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_workstation_cluster.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workstation_cluster.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.delete_workstation_cluster request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested workstation configuration. + # + # @overload get_workstation_config(request, options = nil) + # Pass arguments to `get_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workstation_config(name: nil) + # Pass arguments to `get_workstation_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 requested resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::WorkstationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new + # + # # Call the get_workstation_config method. + # result = client.get_workstation_config request + # + # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationConfig. + # p result + # + def get_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workstation_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::Workstations::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_workstation_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.get_workstation_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 all workstation configurations in the specified cluster. + # + # @overload list_workstation_configs(request, options = nil) + # Pass arguments to `list_workstation_configs` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workstation_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstation_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. Parent resource name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::WorkstationConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new + # + # # Call the list_workstation_configs method. + # result = client.list_workstation_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::Workstations::V1beta::WorkstationConfig. + # p item + # end + # + def list_workstation_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workstation_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::Workstations::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_workstation_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workstation_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_workstation_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstation_configs, "workstation_configs", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all workstation configurations in the specified cluster on which + # the caller has the "workstations.workstation.create" permission. + # + # @overload list_usable_workstation_configs(request, options = nil) + # Pass arguments to `list_usable_workstation_configs` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_usable_workstation_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. Parent resource name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::WorkstationConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new + # + # # Call the list_usable_workstation_configs method. + # result = client.list_usable_workstation_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::Workstations::V1beta::WorkstationConfig. + # p item + # end + # + def list_usable_workstation_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_usable_workstation_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::Workstations::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_usable_workstation_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_usable_workstation_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_usable_workstation_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_usable_workstation_configs, "workstation_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 a new workstation configuration. + # + # @overload create_workstation_config(request, options = nil) + # Pass arguments to `create_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) + # Pass arguments to `create_workstation_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. Parent resource name. + # @param workstation_config_id [::String] + # Required. ID to use for the workstation configuration. + # @param workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash] + # Required. Config to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new + # + # # Call the create_workstation_config method. + # result = client.create_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def create_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest + + # Converts hash and nil to an 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_workstation_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::Workstations::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_workstation_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.create_workstation_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Updates an existing workstation configuration. + # + # @overload update_workstation_config(request, options = nil) + # Pass arguments to `update_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation_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 workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash] + # Required. Config to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration will be created. In this situation, + # update_mask is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new + # + # # Call the update_workstation_config method. + # result = client.update_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def update_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_workstation_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::Workstations::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workstation_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.update_workstation_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Deletes the specified workstation configuration. + # + # @overload delete_workstation_config(request, options = nil) + # Pass arguments to `delete_workstation_config` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) + # Pass arguments to `delete_workstation_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 workstation configuration to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request is rejected if the latest version of the + # workstation configuration on the server does not have this ETag. + # @param force [::Boolean] + # Optional. If set, any workstations in the workstation configuration are + # also deleted. Otherwise, the request works only if the workstation + # configuration has no workstations. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new + # + # # Call the delete_workstation_config method. + # result = client.delete_workstation_config request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def delete_workstation_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_workstation_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::Workstations::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_workstation_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workstation_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.delete_workstation_config request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns the requested workstation. + # + # @overload get_workstation(request, options = nil) + # Pass arguments to `get_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::GetWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_workstation(name: nil) + # Pass arguments to `get_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the requested resource. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::Workstation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::Workstation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new + # + # # Call the get_workstation method. + # result = client.get_workstation request + # + # # The returned object is of type Google::Cloud::Workstations::V1beta::Workstation. + # p result + # + def get_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.get_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.get_workstation request, 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 all Workstations using the specified workstation configuration. + # + # @overload list_workstations(request, options = nil) + # Pass arguments to `list_workstations` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_workstations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_workstations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::Workstation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new + # + # # Call the list_workstations method. + # result = client.list_workstations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. + # p item + # end + # + def list_workstations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_workstations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_workstations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_workstations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstations, "workstations", request, result, options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns all workstations using the specified workstation configuration + # on which the caller has the "workstations.workstations.use" permission. + # + # @overload list_usable_workstations(request, options = nil) + # Pass arguments to `list_usable_workstations` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_usable_workstations(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_usable_workstations` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param page_size [::Integer] + # Optional. Maximum number of items to return. + # @param page_token [::String] + # Optional. 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::Workstations::V1beta::Workstation>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new + # + # # Call the list_usable_workstations method. + # result = client.list_usable_workstations request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. + # p item + # end + # + def list_usable_workstations request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.list_usable_workstations.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_usable_workstations.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_usable_workstations.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.list_usable_workstations request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_usable_workstations, "workstations", request, result, 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 workstation. + # + # @overload create_workstation(request, options = nil) + # Pass arguments to `create_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) + # Pass arguments to `create_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify 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 name. + # @param workstation_id [::String] + # Required. ID to use for the workstation. + # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash] + # Required. Workstation to create. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new + # + # # Call the create_workstation method. + # result = client.create_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest + + # Converts hash and nil to an 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.create_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation. + # + # @overload update_workstation(request, options = nil) + # Pass arguments to `update_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) + # Pass arguments to `update_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash] + # Required. Workstation to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param allow_missing [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration is created. In this situation, update_mask + # is ignored. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new + # + # # Call the update_workstation method. + # result = client.update_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.update_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.update_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.update_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation. + # + # @overload delete_workstation(request, options = nil) + # Pass arguments to `delete_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `delete_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to delete. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new + # + # # Call the delete_workstation method. + # result = client.delete_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.delete_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.delete_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: 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 running a workstation so that users can connect to it. + # + # @overload start_workstation(request, options = nil) + # Pass arguments to `start_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::StartWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::StartWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `start_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to start. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new + # + # # Call the start_workstation method. + # result = client.start_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest + + # Converts hash and nil to an 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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.start_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.start_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.start_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Stops running a workstation, reducing costs. + # + # @overload stop_workstation(request, options = nil) + # Pass arguments to `stop_workstation` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::StopWorkstationRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::StopWorkstationRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) + # Pass arguments to `stop_workstation` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the workstation to stop. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @param etag [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Operation] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new + # + # # Call the stop_workstation method. + # result = client.stop_workstation request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_workstation request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest + + # Converts hash and nil to an 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_workstation.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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.stop_workstation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.stop_workstation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.stop_workstation request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a short-lived credential that can be used to send authenticated and + # authorized traffic to a workstation. + # + # @overload generate_access_token(request, options = nil) + # Pass arguments to `generate_access_token` via a request object, either of type + # {::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_token(expire_time: nil, ttl: nil, workstation: nil) + # Pass arguments to `generate_access_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] + # Desired expiration time of the access token. This value must + # be at most 24 hours in the future. If a value is not specified, the + # token's expiration time will be set to a default value of 1 hour in the + # future. + # + # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. 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 ttl [::Google::Protobuf::Duration, ::Hash] + # Desired lifetime duration of the access token. This value must + # be at most 24 hours. If a value is not specified, the token's lifetime + # will be set to a default value of 1 hour. + # + # Note: The following parameters are mutually exclusive: `ttl`, `expire_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 workstation [::String] + # Required. Name of the workstation for which the access token should be + # generated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/workstations/v1beta" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new + # + # # Call the generate_access_token method. + # result = client.generate_access_token request + # + # # The returned object is of type Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse. + # p result + # + def generate_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest + + # Converts hash and nil to an 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_access_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Workstations::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.generate_access_token.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @workstations_stub.generate_access_token request, 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 Workstations REST API. + # + # This class represents the configuration for Workstations 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::Workstations::V1beta::Workstations::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_workstation_cluster to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_workstation_cluster.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_workstation_cluster.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workstations.googleapis.com" + + config_attr :endpoint, nil, ::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 Workstations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `get_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation_cluster + ## + # RPC-specific configuration for `list_workstation_clusters` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstation_clusters + ## + # RPC-specific configuration for `create_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation_cluster + ## + # RPC-specific configuration for `update_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation_cluster + ## + # RPC-specific configuration for `delete_workstation_cluster` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation_cluster + ## + # RPC-specific configuration for `get_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation_config + ## + # RPC-specific configuration for `list_workstation_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstation_configs + ## + # RPC-specific configuration for `list_usable_workstation_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_usable_workstation_configs + ## + # RPC-specific configuration for `create_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation_config + ## + # RPC-specific configuration for `update_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation_config + ## + # RPC-specific configuration for `delete_workstation_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation_config + ## + # RPC-specific configuration for `get_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_workstation + ## + # RPC-specific configuration for `list_workstations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_workstations + ## + # RPC-specific configuration for `list_usable_workstations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_usable_workstations + ## + # RPC-specific configuration for `create_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :create_workstation + ## + # RPC-specific configuration for `update_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :update_workstation + ## + # RPC-specific configuration for `delete_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_workstation + ## + # RPC-specific configuration for `start_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :start_workstation + ## + # RPC-specific configuration for `stop_workstation` + # @return [::Gapic::Config::Method] + # + attr_reader :stop_workstation + ## + # RPC-specific configuration for `generate_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_access_token + + # @private + def initialize parent_rpcs = nil + get_workstation_cluster_config = parent_rpcs.get_workstation_cluster if parent_rpcs.respond_to? :get_workstation_cluster + @get_workstation_cluster = ::Gapic::Config::Method.new get_workstation_cluster_config + list_workstation_clusters_config = parent_rpcs.list_workstation_clusters if parent_rpcs.respond_to? :list_workstation_clusters + @list_workstation_clusters = ::Gapic::Config::Method.new list_workstation_clusters_config + create_workstation_cluster_config = parent_rpcs.create_workstation_cluster if parent_rpcs.respond_to? :create_workstation_cluster + @create_workstation_cluster = ::Gapic::Config::Method.new create_workstation_cluster_config + update_workstation_cluster_config = parent_rpcs.update_workstation_cluster if parent_rpcs.respond_to? :update_workstation_cluster + @update_workstation_cluster = ::Gapic::Config::Method.new update_workstation_cluster_config + delete_workstation_cluster_config = parent_rpcs.delete_workstation_cluster if parent_rpcs.respond_to? :delete_workstation_cluster + @delete_workstation_cluster = ::Gapic::Config::Method.new delete_workstation_cluster_config + get_workstation_config_config = parent_rpcs.get_workstation_config if parent_rpcs.respond_to? :get_workstation_config + @get_workstation_config = ::Gapic::Config::Method.new get_workstation_config_config + list_workstation_configs_config = parent_rpcs.list_workstation_configs if parent_rpcs.respond_to? :list_workstation_configs + @list_workstation_configs = ::Gapic::Config::Method.new list_workstation_configs_config + list_usable_workstation_configs_config = parent_rpcs.list_usable_workstation_configs if parent_rpcs.respond_to? :list_usable_workstation_configs + @list_usable_workstation_configs = ::Gapic::Config::Method.new list_usable_workstation_configs_config + create_workstation_config_config = parent_rpcs.create_workstation_config if parent_rpcs.respond_to? :create_workstation_config + @create_workstation_config = ::Gapic::Config::Method.new create_workstation_config_config + update_workstation_config_config = parent_rpcs.update_workstation_config if parent_rpcs.respond_to? :update_workstation_config + @update_workstation_config = ::Gapic::Config::Method.new update_workstation_config_config + delete_workstation_config_config = parent_rpcs.delete_workstation_config if parent_rpcs.respond_to? :delete_workstation_config + @delete_workstation_config = ::Gapic::Config::Method.new delete_workstation_config_config + get_workstation_config = parent_rpcs.get_workstation if parent_rpcs.respond_to? :get_workstation + @get_workstation = ::Gapic::Config::Method.new get_workstation_config + list_workstations_config = parent_rpcs.list_workstations if parent_rpcs.respond_to? :list_workstations + @list_workstations = ::Gapic::Config::Method.new list_workstations_config + list_usable_workstations_config = parent_rpcs.list_usable_workstations if parent_rpcs.respond_to? :list_usable_workstations + @list_usable_workstations = ::Gapic::Config::Method.new list_usable_workstations_config + create_workstation_config = parent_rpcs.create_workstation if parent_rpcs.respond_to? :create_workstation + @create_workstation = ::Gapic::Config::Method.new create_workstation_config + update_workstation_config = parent_rpcs.update_workstation if parent_rpcs.respond_to? :update_workstation + @update_workstation = ::Gapic::Config::Method.new update_workstation_config + delete_workstation_config = parent_rpcs.delete_workstation if parent_rpcs.respond_to? :delete_workstation + @delete_workstation = ::Gapic::Config::Method.new delete_workstation_config + start_workstation_config = parent_rpcs.start_workstation if parent_rpcs.respond_to? :start_workstation + @start_workstation = ::Gapic::Config::Method.new start_workstation_config + stop_workstation_config = parent_rpcs.stop_workstation if parent_rpcs.respond_to? :stop_workstation + @stop_workstation = ::Gapic::Config::Method.new stop_workstation_config + generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token + @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb new file mode 100644 index 000000000000..582c87e5cfde --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "gapic/operation" + +module Google + module Cloud + module Workstations + module V1beta + module Workstations + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Workstations 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 Workstations 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::Workstations::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::Workstations::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::Workstations::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::Workstations::V1beta::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_operation.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @operations_stub.cancel_operation request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Configuration class for the Operations REST API. + # + # This class represents the configuration for Operations REST, + # providing control over timeouts, retry behavior, logging, transport + # parameters, and other low-level controls. Certain parameters can also be + # applied individually to specific RPCs. See + # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # list_operations to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Longrunning::Operations::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_operations.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "workstations.googleapis.com" + + config_attr :endpoint, nil, ::String, nil + config_attr :credentials, nil do |value| + allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] + allowed.any? { |klass| klass === value } + end + config_attr :scope, nil, ::String, ::Array, nil + config_attr :lib_name, nil, ::String, nil + config_attr :lib_version, nil, ::String, nil + config_attr :timeout, nil, ::Numeric, nil + config_attr :metadata, nil, ::Hash, nil + config_attr :retry_policy, nil, ::Hash, ::Proc, nil + config_attr :quota_project, nil, ::String, nil + config_attr :universe_domain, nil, ::String, nil + config_attr :logger, :default, ::Logger, nil, :default + + # @private + def initialize parent_config = nil + @parent_config = parent_config unless parent_config.nil? + + yield self if block_given? + end + + ## + # Configurations for individual RPCs + # @return [Rpcs] + # + def rpcs + @rpcs ||= begin + parent_rpcs = nil + parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) + Rpcs.new parent_rpcs + end + end + + ## + # Configuration RPC class for the Operations API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `list_operations` + # @return [::Gapic::Config::Method] + # + attr_reader :list_operations + ## + # RPC-specific configuration for `get_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :get_operation + ## + # RPC-specific configuration for `delete_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_operation + ## + # RPC-specific configuration for `cancel_operation` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_operation + + # @private + def initialize parent_rpcs = nil + list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations + @list_operations = ::Gapic::Config::Method.new list_operations_config + get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation + @get_operation = ::Gapic::Config::Method.new get_operation_config + delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation + @delete_operation = ::Gapic::Config::Method.new delete_operation_config + cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation + @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config + + yield self if block_given? + end + end + end + end + + ## + # @private + # REST service stub for the Longrunning Operations API. + # Service stub contains baseline method implementations + # including transcoding, making the REST call, and deserialing the response. + class OperationsServiceStub + def initialize endpoint:, endpoint_template:, universe_domain:, credentials: + # These require statements are intentionally placed here to initialize + # the REST modules only when it's required. + require "gapic/rest" + + @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, + endpoint_template: endpoint_template, + universe_domain: universe_domain, + credentials: credentials + end + + ## + # Baseline implementation for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::ListOperationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::ListOperationsResponse] + # A result object deserialized from the server's reply + def list_operations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_operations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def get_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def delete_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Protobuf::Empty] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Protobuf::Empty] + # A result object deserialized from the server's reply + def cancel_operation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "cancel_operation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # @private + # + # GRPC transcoding helper method for the list_operations REST call + # + # @param request_pb [::Google::Longrunning::ListOperationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_operations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/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-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb new file mode 100644 index 000000000000..402c25eda4b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb @@ -0,0 +1,1310 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workstations/v1beta/workstations_pb" + +module Google + module Cloud + module Workstations + module V1beta + module Workstations + module Rest + ## + # REST service stub for the Workstations 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_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::WorkstationCluster] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] + # A result object deserialized from the server's reply + def get_workstation_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workstation_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1beta::WorkstationCluster.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workstation_clusters REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse] + # A result object deserialized from the server's reply + def list_workstation_clusters request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workstation_clusters_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workstation_clusters", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse.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_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_workstation_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_workstation_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_cluster request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_cluster_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workstation_cluster", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::WorkstationConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] + # A result object deserialized from the server's reply + def get_workstation_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_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_workstation_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1beta::WorkstationConfig.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workstation_configs REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse] + # A result object deserialized from the server's reply + def list_workstation_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workstation_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_workstation_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_usable_workstation_configs REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse] + # A result object deserialized from the server's reply + def list_usable_workstation_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_usable_workstation_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_usable_workstation_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse.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_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_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_workstation_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_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_workstation_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_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_workstation_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the get_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::Workstation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::Workstation] + # A result object deserialized from the server's reply + def get_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "get_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1beta::Workstation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_workstations REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse] + # A result object deserialized from the server's reply + def list_workstations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_workstations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_workstations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the list_usable_workstations REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse] + # A result object deserialized from the server's reply + def list_usable_workstations request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_usable_workstations_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "list_usable_workstations", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse.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_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the update_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "update_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the delete_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "delete_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::StartWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_start_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::StopWorkstationRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_workstation request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_stop_workstation_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_workstation", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Longrunning::Operation.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_access_token REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] + # A result object deserialized from the server's reply + def generate_access_token request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_access_token_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_access_token", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse.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_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workstation_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workstation_clusters REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workstation_clusters_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/workstationClusters", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest] + # 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_workstation_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/workstationClusters", + body: "workstation_cluster", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workstation_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{workstation_cluster.name}", + body: "workstation_cluster", + matches: [ + ["workstation_cluster.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workstation_cluster REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workstation_cluster_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workstation_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workstation_configs REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workstation_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/workstationConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_usable_workstation_configs REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_usable_workstation_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/workstationConfigs:listUsable", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest] + # 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_workstation_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/workstationConfigs", + body: "workstation_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workstation_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{workstation_config.name}", + body: "workstation_config", + matches: [ + ["workstation_config.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workstation_config REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workstation_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_workstations REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_workstations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/workstations", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_usable_workstations REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_list_usable_workstations_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1beta/{parent}/workstations:listUsable", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest] + # 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_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{parent}/workstations", + body: "workstation", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_update_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1beta/{workstation.name}", + body: "workstation", + matches: [ + ["workstation.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1beta/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the start_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::StartWorkstationRequest] + # 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_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:start", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the stop_workstation REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::StopWorkstationRequest] + # 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_workstation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{name}:stop", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_access_token REST call + # + # @param request_pb [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest] + # 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_access_token_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1beta/{workstation}:generateAccessToken", + body: "*", + matches: [ + ["workstation", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb new file mode 100644 index 000000000000..b5efedb0b871 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb @@ -0,0 +1,100 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/workstations/v1beta/workstations.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/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n3google/cloud/workstations/v1beta/workstations.proto\x12 google.cloud.workstations.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\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x93\t\n\x12WorkstationCluster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12_\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x45.google.cloud.workstations.v1beta.WorkstationCluster.AnnotationsEntryB\x03\xe0\x41\x01\x12U\n\x06labels\x18\x0f \x03(\x0b\x32@.google.cloud.workstations.v1beta.WorkstationCluster.LabelsEntryB\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\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07network\x18\n \x01(\tB\x03\xe0\x41\x05\x12\x17\n\nsubnetwork\x18\x0b \x01(\tB\x03\xe0\x41\x05\x12\x1d\n\x10\x63ontrol_plane_ip\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12n\n\x16private_cluster_config\x18\x0c \x01(\x0b\x32I.google.cloud.workstations.v1beta.WorkstationCluster.PrivateClusterConfigB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65graded\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x0e \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\x9f\x01\n\x14PrivateClusterConfig\x12$\n\x17\x65nable_private_endpoint\x18\x01 \x01(\x08\x42\x03\xe0\x41\x05\x12\x1d\n\x10\x63luster_hostname\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16service_attachment_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x61llowed_projects\x18\x04 \x03(\tB\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb3\x01\xea\x41\xaf\x01\n.workstations.googleapis.com/WorkstationCluster\x12Qprojects/{project}/locations/{location}/workstationClusters/{workstation_cluster}*\x13workstationClusters2\x12workstationClusterR\x01\x01\"\xc2\x1e\n\x11WorkstationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12^\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x44.google.cloud.workstations.v1beta.WorkstationConfig.AnnotationsEntryB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x12 \x03(\x0b\x32?.google.cloud.workstations.v1beta.WorkstationConfig.LabelsEntryB\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\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0frunning_timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12K\n\x04host\x18\x0c \x01(\x0b\x32\x38.google.cloud.workstations.v1beta.WorkstationConfig.HostB\x03\xe0\x41\x01\x12l\n\x16persistent_directories\x18\r \x03(\x0b\x32G.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectoryB\x03\xe0\x41\x01\x12j\n\x15\x65phemeral_directories\x18\x16 \x03(\x0b\x32\x46.google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectoryB\x03\xe0\x41\x01\x12U\n\tcontainer\x18\x0e \x01(\x0b\x32=.google.cloud.workstations.v1beta.WorkstationConfig.ContainerB\x03\xe0\x41\x01\x12\x66\n\x0e\x65ncryption_key\x18\x11 \x01(\x0b\x32I.google.cloud.workstations.v1beta.WorkstationConfig.CustomerEncryptionKeyB\x03\xe0\x41\x05\x12\x61\n\x10readiness_checks\x18\x13 \x03(\x0b\x32\x42.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheckB\x03\xe0\x41\x01\x12\x1d\n\rreplica_zones\x18\x17 \x03(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12\x15\n\x08\x64\x65graded\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x10 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x1f\n\x12\x65nable_audit_agent\x18\x14 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xa4\x08\n\x04Host\x12\\\n\x0cgce_instance\x18\x01 \x01(\x0b\x32\x44.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstanceH\x00\x1a\xb3\x07\n\x0bGceInstance\x12\x19\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16service_account_scopes\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10pooled_instances\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12(\n\x1b\x64isable_public_ip_addresses\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x85\x01\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32^.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceShieldedInstanceConfigB\x03\xe0\x41\x01\x12\x8d\x01\n\x1c\x63onfidential_instance_config\x18\n \x01(\x0b\x32\x62.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfigB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\t \x01(\x05\x42\x03\xe0\x41\x01\x12k\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x1a\x80\x01\n\x19GceShieldedInstanceConfig\x12\x1f\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x65nable_vtpm\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1b\x65nable_integrity_monitoring\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x1dGceConfidentialInstanceConfig\x12(\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x34\n\x0b\x41\x63\x63\x65lerator\x12\x11\n\x04type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x63ount\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x42\x08\n\x06\x63onfig\x1a\x8d\x04\n\x13PersistentDirectory\x12s\n\x06gce_pd\x18\x02 \x01(\x0b\x32\x61.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xd5\x02\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07\x66s_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x8c\x01\n\x0ereclaim_policy\x18\x04 \x01(\x0e\x32o.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicyB\x03\xe0\x41\x01\"G\n\rReclaimPolicy\x12\x1e\n\x1aRECLAIM_POLICY_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\n\n\x06RETAIN\x10\x02\x42\x10\n\x0e\x64irectory_type\x1a\xa9\x02\n\x12\x45phemeralDirectory\x12j\n\x06gce_pd\x18\x03 \x01(\x0b\x32X.google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDiskH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a|\n\x11GcePersistentDisk\x12\x16\n\tdisk_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0csource_image\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tread_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x10\n\x0e\x64irectory_type\x1a\x82\x02\n\tContainer\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63ommand\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61rgs\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12X\n\x03\x65nv\x18\x04 \x03(\x0b\x32\x46.google.cloud.workstations.v1beta.WorkstationConfig.Container.EnvEntryB\x03\xe0\x41\x01\x12\x18\n\x0bworking_dir\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0brun_as_user\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aS\n\x15\x43ustomerEncryptionKey\x12\x14\n\x07kms_key\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12$\n\x17kms_key_service_account\x18\x02 \x01(\tB\x03\xe0\x41\x05\x1a\x36\n\x0eReadinessCheck\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xd8\x01\xea\x41\xd4\x01\n-workstations.googleapis.com/WorkstationConfig\x12yprojects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}*\x12workstationConfigs2\x11workstationConfigR\x01\x01\"\xfe\x08\n\x0bWorkstation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12X\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32>.google.cloud.workstations.v1beta.Workstation.AnnotationsEntryB\x03\xe0\x41\x01\x12N\n\x06labels\x18\r \x03(\x0b\x32\x39.google.cloud.workstations.v1beta.Workstation.LabelsEntryB\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\x33\n\nstart_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12G\n\x05state\x18\n \x01(\x0e\x32\x33.google.cloud.workstations.v1beta.Workstation.StateB\x03\xe0\x41\x03\x12\x11\n\x04host\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12H\n\x03\x65nv\x18\x0c \x03(\x0b\x32\x36.google.cloud.workstations.v1beta.Workstation.EnvEntryB\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATE_STARTING\x10\x01\x12\x11\n\rSTATE_RUNNING\x10\x02\x12\x12\n\x0eSTATE_STOPPING\x10\x03\x12\x11\n\rSTATE_STOPPED\x10\x04:\xe2\x01\xea\x41\xde\x01\n\'workstations.googleapis.com/Workstation\x12\x94\x01projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}*\x0cworkstations2\x0bworkstationR\x01\x01\"d\n\x1cGetWorkstationClusterRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\"\x99\x01\n\x1eListWorkstationClustersRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.workstations.googleapis.com/WorkstationCluster\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\"\xa3\x01\n\x1fListWorkstationClustersResponse\x12R\n\x14workstation_clusters\x18\x01 \x03(\x0b\x32\x34.google.cloud.workstations.v1beta.WorkstationCluster\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x82\x02\n\x1f\x43reateWorkstationClusterRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.workstations.googleapis.com/WorkstationCluster\x12#\n\x16workstation_cluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x13workstation_cluster\x18\x03 \x01(\x0b\x32\x34.google.cloud.workstations.v1beta.WorkstationClusterB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe7\x01\n\x1fUpdateWorkstationClusterRequest\x12V\n\x13workstation_cluster\x18\x01 \x01(\x0b\x32\x34.google.cloud.workstations.v1beta.WorkstationClusterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x01\n\x1f\x44\x65leteWorkstationClusterRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"b\n\x1bGetWorkstationConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\"\x98\x01\n\x1dListWorkstationConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\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\"\xa0\x01\n\x1eListWorkstationConfigsResponse\x12P\n\x13workstation_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.workstations.v1beta.WorkstationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x9e\x01\n#ListUsableWorkstationConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\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\"\xa6\x01\n$ListUsableWorkstationConfigsResponse\x12P\n\x13workstation_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.workstations.v1beta.WorkstationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xfe\x01\n\x1e\x43reateWorkstationConfigRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\x12\"\n\x15workstation_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x12workstation_config\x18\x03 \x01(\x0b\x32\x33.google.cloud.workstations.v1beta.WorkstationConfigB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe4\x01\n\x1eUpdateWorkstationConfigRequest\x12T\n\x12workstation_config\x18\x01 \x01(\x0b\x32\x33.google.cloud.workstations.v1beta.WorkstationConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x1e\x44\x65leteWorkstationConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x15GetWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\"\x91\x01\n\x17ListWorkstationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\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\"\x97\x01\n\x18ListWorkstationsResponse\x12\x43\n\x0cworkstations\x18\x01 \x03(\x0b\x32-.google.cloud.workstations.v1beta.Workstation\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x97\x01\n\x1dListUsableWorkstationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\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\"\x93\x01\n\x1eListUsableWorkstationsResponse\x12\x43\n\x0cworkstations\x18\x01 \x03(\x0b\x32-.google.cloud.workstations.v1beta.Workstation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe3\x01\n\x18\x43reateWorkstationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\x12\x1b\n\x0eworkstation_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12G\n\x0bworkstation\x18\x03 \x01(\x0b\x32-.google.cloud.workstations.v1beta.WorkstationB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xd1\x01\n\x18UpdateWorkstationRequest\x12G\n\x0bworkstation\x18\x01 \x01(\x0b\x32-.google.cloud.workstations.v1beta.WorkstationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x01\n\x18\x44\x65leteWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x17StartWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x16StopWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xcd\x01\n\x1aGenerateAccessTokenRequest\x12\x31\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12(\n\x03ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x44\n\x0bworkstation\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/WorkstationB\x0c\n\nexpiration\"d\n\x1bGenerateAccessTokenResponse\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\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\xdf+\n\x0cWorkstations\x12\xd9\x01\n\x15GetWorkstationCluster\x12>.google.cloud.workstations.v1beta.GetWorkstationClusterRequest\x1a\x34.google.cloud.workstations.v1beta.WorkstationCluster\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1beta/{name=projects/*/locations/*/workstationClusters/*}\x12\xec\x01\n\x17ListWorkstationClusters\x12@.google.cloud.workstations.v1beta.ListWorkstationClustersRequest\x1a\x41.google.cloud.workstations.v1beta.ListWorkstationClustersResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1beta/{parent=projects/*/locations/*}/workstationClusters\x12\xb5\x02\n\x18\x43reateWorkstationCluster\x12\x41.google.cloud.workstations.v1beta.CreateWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x31parent,workstation_cluster,workstation_cluster_id\x82\xd3\xe4\x93\x02R\";/v1beta/{parent=projects/*/locations/*}/workstationClusters:\x13workstation_cluster\x12\xb7\x02\n\x18UpdateWorkstationCluster\x12\x41.google.cloud.workstations.v1beta.UpdateWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x1fworkstation_cluster,update_mask\x82\xd3\xe4\x93\x02\x66\x32O/v1beta/{workstation_cluster.name=projects/*/locations/*/workstationClusters/*}:\x13workstation_cluster\x12\xf2\x01\n\x18\x44\x65leteWorkstationCluster\x12\x41.google.cloud.workstations.v1beta.DeleteWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1beta/{name=projects/*/locations/*/workstationClusters/*}\x12\xeb\x01\n\x14GetWorkstationConfig\x12=.google.cloud.workstations.v1beta.GetWorkstationConfigRequest\x1a\x33.google.cloud.workstations.v1beta.WorkstationConfig\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R\x12P/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}\x12\xfe\x01\n\x16ListWorkstationConfigs\x12?.google.cloud.workstations.v1beta.ListWorkstationConfigsRequest\x1a@.google.cloud.workstations.v1beta.ListWorkstationConfigsResponse\"a\xda\x41\x06parent\x82\xd3\xe4\x93\x02R\x12P/v1beta/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs\x12\x9b\x02\n\x1cListUsableWorkstationConfigs\x12\x45.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest\x1a\x46.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsResponse\"l\xda\x41\x06parent\x82\xd3\xe4\x93\x02]\x12[/v1beta/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs:listUsable\x12\xc4\x02\n\x17\x43reateWorkstationConfig\x12@.google.cloud.workstations.v1beta.CreateWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41/parent,workstation_config,workstation_config_id\x82\xd3\xe4\x93\x02\x66\"P/v1beta/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs:\x12workstation_config\x12\xc6\x02\n\x17UpdateWorkstationConfig\x12@.google.cloud.workstations.v1beta.UpdateWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41\x1eworkstation_config,update_mask\x82\xd3\xe4\x93\x02y2c/v1beta/{workstation_config.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}:\x12workstation_config\x12\x85\x02\n\x17\x44\x65leteWorkstationConfig\x12@.google.cloud.workstations.v1beta.DeleteWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R*P/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}\x12\xe8\x01\n\x0eGetWorkstation\x12\x37.google.cloud.workstations.v1beta.GetWorkstationRequest\x1a-.google.cloud.workstations.v1beta.Workstation\"n\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61\x12_/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}\x12\xfb\x01\n\x10ListWorkstations\x12\x39.google.cloud.workstations.v1beta.ListWorkstationsRequest\x1a:.google.cloud.workstations.v1beta.ListWorkstationsResponse\"p\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x61\x12_/v1beta/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations\x12\x98\x02\n\x16ListUsableWorkstations\x12?.google.cloud.workstations.v1beta.ListUsableWorkstationsRequest\x1a@.google.cloud.workstations.v1beta.ListUsableWorkstationsResponse\"{\xda\x41\x06parent\x82\xd3\xe4\x93\x02l\x12j/v1beta/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations:listUsable\x12\xac\x02\n\x11\x43reateWorkstation\x12:.google.cloud.workstations.v1beta.CreateWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\xbb\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41!parent,workstation,workstation_id\x82\xd3\xe4\x93\x02n\"_/v1beta/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations:\x0bworkstation\x12\xae\x02\n\x11UpdateWorkstation\x12:.google.cloud.workstations.v1beta.UpdateWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\xbd\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x17workstation,update_mask\x82\xd3\xe4\x93\x02z2k/v1beta/{workstation.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:\x0bworkstation\x12\x82\x02\n\x11\x44\x65leteWorkstation\x12:.google.cloud.workstations.v1beta.DeleteWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61*_/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}\x12\x89\x02\n\x10StartWorkstation\x12\x39.google.cloud.workstations.v1beta.StartWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02j\"e/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:start:\x01*\x12\x86\x02\n\x0fStopWorkstation\x12\x38.google.cloud.workstations.v1beta.StopWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02i\"d/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:stop:\x01*\x12\xa8\x02\n\x13GenerateAccessToken\x12<.google.cloud.workstations.v1beta.GenerateAccessTokenRequest\x1a=.google.cloud.workstations.v1beta.GenerateAccessTokenResponse\"\x93\x01\xda\x41\x0bworkstation\x82\xd3\xe4\x93\x02\x7f\"z/v1beta/{workstation=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:generateAccessToken:\x01*\x1aO\xca\x41\x1bworkstations.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x01\n$com.google.cloud.workstations.v1betaB\x11WorkstationsProtoP\x01ZHcloud.google.com/go/workstations/apiv1beta/workstationspb;workstationspbb\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.rpc.Status", "google/rpc/status.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Workstations + module V1beta + WorkstationCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster").msgclass + WorkstationCluster::PrivateClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster.PrivateClusterConfig").msgclass + WorkstationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig").msgclass + WorkstationConfig::Host = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host").msgclass + WorkstationConfig::Host::GceInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance").msgclass + WorkstationConfig::Host::GceInstance::GceShieldedInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceShieldedInstanceConfig").msgclass + WorkstationConfig::Host::GceInstance::GceConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfig").msgclass + WorkstationConfig::Host::GceInstance::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator").msgclass + WorkstationConfig::PersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory").msgclass + WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk").msgclass + WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicy").enummodule + WorkstationConfig::EphemeralDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory").msgclass + WorkstationConfig::EphemeralDirectory::GcePersistentDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDisk").msgclass + WorkstationConfig::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Container").msgclass + WorkstationConfig::CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.CustomerEncryptionKey").msgclass + WorkstationConfig::ReadinessCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck").msgclass + Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation").msgclass + Workstation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.State").enummodule + GetWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GetWorkstationClusterRequest").msgclass + ListWorkstationClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationClustersRequest").msgclass + ListWorkstationClustersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationClustersResponse").msgclass + CreateWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.CreateWorkstationClusterRequest").msgclass + UpdateWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.UpdateWorkstationClusterRequest").msgclass + DeleteWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.DeleteWorkstationClusterRequest").msgclass + GetWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GetWorkstationConfigRequest").msgclass + ListWorkstationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationConfigsRequest").msgclass + ListWorkstationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationConfigsResponse").msgclass + ListUsableWorkstationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest").msgclass + ListUsableWorkstationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListUsableWorkstationConfigsResponse").msgclass + CreateWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.CreateWorkstationConfigRequest").msgclass + UpdateWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.UpdateWorkstationConfigRequest").msgclass + DeleteWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.DeleteWorkstationConfigRequest").msgclass + GetWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GetWorkstationRequest").msgclass + ListWorkstationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationsRequest").msgclass + ListWorkstationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationsResponse").msgclass + ListUsableWorkstationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListUsableWorkstationsRequest").msgclass + ListUsableWorkstationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListUsableWorkstationsResponse").msgclass + CreateWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.CreateWorkstationRequest").msgclass + UpdateWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.UpdateWorkstationRequest").msgclass + DeleteWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.DeleteWorkstationRequest").msgclass + StartWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.StartWorkstationRequest").msgclass + StopWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.StopWorkstationRequest").msgclass + GenerateAccessTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GenerateAccessTokenRequest").msgclass + GenerateAccessTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GenerateAccessTokenResponse").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb new file mode 100644 index 000000000000..90f2fe5da085 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb @@ -0,0 +1,86 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/workstations/v1beta/workstations.proto for package 'google.cloud.workstations.v1beta' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require 'grpc' +require 'google/cloud/workstations/v1beta/workstations_pb' + +module Google + module Cloud + module Workstations + module V1beta + module Workstations + # Service for interacting with Cloud Workstations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.workstations.v1beta.Workstations' + + # Returns the requested workstation cluster. + rpc :GetWorkstationCluster, ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest, ::Google::Cloud::Workstations::V1beta::WorkstationCluster + # Returns all workstation clusters in the specified location. + rpc :ListWorkstationClusters, ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest, ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse + # Creates a new workstation cluster. + rpc :CreateWorkstationCluster, ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest, ::Google::Longrunning::Operation + # Updates an existing workstation cluster. + rpc :UpdateWorkstationCluster, ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest, ::Google::Longrunning::Operation + # Deletes the specified workstation cluster. + rpc :DeleteWorkstationCluster, ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest, ::Google::Longrunning::Operation + # Returns the requested workstation configuration. + rpc :GetWorkstationConfig, ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest, ::Google::Cloud::Workstations::V1beta::WorkstationConfig + # Returns all workstation configurations in the specified cluster. + rpc :ListWorkstationConfigs, ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest, ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse + # Returns all workstation configurations in the specified cluster on which + # the caller has the "workstations.workstation.create" permission. + rpc :ListUsableWorkstationConfigs, ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest, ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse + # Creates a new workstation configuration. + rpc :CreateWorkstationConfig, ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest, ::Google::Longrunning::Operation + # Updates an existing workstation configuration. + rpc :UpdateWorkstationConfig, ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest, ::Google::Longrunning::Operation + # Deletes the specified workstation configuration. + rpc :DeleteWorkstationConfig, ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest, ::Google::Longrunning::Operation + # Returns the requested workstation. + rpc :GetWorkstation, ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest, ::Google::Cloud::Workstations::V1beta::Workstation + # Returns all Workstations using the specified workstation configuration. + rpc :ListWorkstations, ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest, ::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse + # Returns all workstations using the specified workstation configuration + # on which the caller has the "workstations.workstations.use" permission. + rpc :ListUsableWorkstations, ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest, ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse + # Creates a new workstation. + rpc :CreateWorkstation, ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest, ::Google::Longrunning::Operation + # Updates an existing workstation. + rpc :UpdateWorkstation, ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest, ::Google::Longrunning::Operation + # Deletes the specified workstation. + rpc :DeleteWorkstation, ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest, ::Google::Longrunning::Operation + # Starts running a workstation so that users can connect to it. + rpc :StartWorkstation, ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest, ::Google::Longrunning::Operation + # Stops running a workstation, reducing costs. + rpc :StopWorkstation, ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest, ::Google::Longrunning::Operation + # Returns a short-lived credential that can be used to send authenticated and + # authorized traffic to a workstation. + rpc :GenerateAccessToken, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/README.md new file mode 100644 index 000000000000..3f70f22b3c09 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Workstations 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-workstations-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb new file mode 100644 index 000000000000..dc2b64da78fb --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb @@ -0,0 +1,1265 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Workstations + module V1beta + # A workstation cluster resource in the Cloud Workstations API. + # + # Defines a group of workstations in a particular region and the + # VPC network they're attached to. + # @!attribute [rw] name + # @return [::String] + # Full name of this workstation cluster. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human-readable name for this workstation cluster. + # @!attribute [r] uid + # @return [::String] + # Output only. A system-assigned unique identifier for this workstation + # cluster. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Indicates whether this workstation cluster is currently being + # updated to match its intended state. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client-specified annotations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. + # [Labels](https://cloud.google.com/workstations/docs/label-resources) that + # are applied to the workstation cluster and that are also propagated to the + # underlying Compute Engine resources. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation cluster was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation cluster was most recently updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation cluster was soft-deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. Checksum computed by the server. May be sent on update and delete + # requests to make sure that the client has an up-to-date value before + # proceeding. + # @!attribute [rw] network + # @return [::String] + # Immutable. Name of the Compute Engine network in which instances associated + # with this workstation cluster will be created. + # @!attribute [rw] subnetwork + # @return [::String] + # Immutable. Name of the Compute Engine subnetwork in which instances + # associated with this workstation cluster will be created. Must be part of + # the subnetwork specified for this workstation cluster. + # @!attribute [r] control_plane_ip + # @return [::String] + # Output only. The private IP address of the control plane for this + # workstation cluster. Workstation VMs need access to this IP address to work + # with the service, so make sure that your firewall rules allow egress from + # the workstation VMs to this address. + # @!attribute [rw] private_cluster_config + # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster::PrivateClusterConfig] + # Optional. Configuration for private workstation cluster. + # @!attribute [r] degraded + # @return [::Boolean] + # Output only. Whether this workstation cluster is in degraded mode, in which + # case it may require user action to restore full functionality. Details can + # be found in + # {::Google::Cloud::Workstations::V1beta::WorkstationCluster#conditions conditions}. + # @!attribute [r] conditions + # @return [::Array<::Google::Rpc::Status>] + # Output only. Status conditions describing the workstation cluster's current + # state. + class WorkstationCluster + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration options for private workstation clusters. + # @!attribute [rw] enable_private_endpoint + # @return [::Boolean] + # Immutable. Whether Workstations endpoint is private. + # @!attribute [r] cluster_hostname + # @return [::String] + # Output only. Hostname for the workstation cluster. This field will be + # populated only when private endpoint is enabled. To access workstations + # in the workstation cluster, create a new DNS zone mapping this domain + # name to an internal IP address and a forwarding rule mapping that address + # to the service attachment. + # @!attribute [r] service_attachment_uri + # @return [::String] + # Output only. Service attachment URI for the workstation cluster. The + # service attachemnt is created when private endpoint is enabled. To access + # workstations in the workstation cluster, configure access to the managed + # service using [Private Service + # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). + # @!attribute [rw] allowed_projects + # @return [::Array<::String>] + # Optional. Additional projects that are allowed to attach to the + # workstation cluster's service attachment. By default, the workstation + # cluster's project and the VPC host project (if different) are allowed. + class PrivateClusterConfig + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A workstation configuration resource in the Cloud Workstations API. + # + # Workstation configurations act as templates for workstations. The workstation + # configuration defines details such as the workstation virtual machine (VM) + # instance type, persistent storage, container image defining environment, + # which IDE or Code Editor to use, and more. Administrators and platform teams + # can also use [Identity and Access Management + # (IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to + # teams or to individual developers. + # @!attribute [rw] name + # @return [::String] + # Full name of this workstation configuration. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human-readable name for this workstation configuration. + # @!attribute [r] uid + # @return [::String] + # Output only. A system-assigned unique identifier for this workstation + # configuration. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Indicates whether this workstation configuration is currently + # being updated to match its intended state. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client-specified annotations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. + # [Labels](https://cloud.google.com/workstations/docs/label-resources) that + # are applied to the workstation configuration and that are also propagated + # to the underlying Compute Engine resources. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation configuration was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation configuration was most recently + # updated. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation configuration was soft-deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. Checksum computed by the server. May be sent on update and delete + # requests to make sure that the client has an up-to-date value before + # proceeding. + # @!attribute [rw] idle_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Number of seconds to wait before automatically stopping a + # workstation after it last received user traffic. + # + # A value of `"0s"` indicates that Cloud Workstations VMs created with this + # configuration should never time out due to idleness. + # Provide + # [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) + # terminated by `s` for seconds—for example, `"7200s"` (2 hours). + # The default is `"1200s"` (20 minutes). + # @!attribute [rw] running_timeout + # @return [::Google::Protobuf::Duration] + # Optional. Number of seconds that a workstation can run until it is + # automatically shut down. We recommend that workstations be shut down daily + # to reduce costs and so that security updates can be applied upon restart. + # The + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#idle_timeout idle_timeout} + # and + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#running_timeout running_timeout} + # fields are independent of each other. Note that the + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#running_timeout running_timeout} + # field shuts down VMs after the specified time, regardless of whether or not + # the VMs are idle. + # + # Provide duration terminated by `s` for seconds—for example, `"54000s"` + # (15 hours). Defaults to `"43200s"` (12 hours). A value of `"0s"` indicates + # that workstations using this configuration should never time out. If + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#encryption_key encryption_key} + # is set, it must be greater than `"0s"` and less than + # `"86400s"` (24 hours). + # + # Warning: A value of `"0s"` indicates that Cloud Workstations VMs created + # with this configuration have no maximum running time. This is strongly + # discouraged because you incur costs and will not pick up security updates. + # @!attribute [rw] host + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host] + # Optional. Runtime host for the workstation. + # @!attribute [rw] persistent_directories + # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory>] + # Optional. Directories to persist across workstation sessions. + # @!attribute [rw] ephemeral_directories + # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory>] + # Optional. Ephemeral directories which won't persist across workstation + # sessions. + # @!attribute [rw] container + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Container] + # Optional. Container that runs upon startup for each workstation using this + # workstation configuration. + # @!attribute [rw] encryption_key + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::CustomerEncryptionKey] + # Immutable. Encrypts resources of this workstation configuration using a + # customer-managed encryption key (CMEK). + # + # If specified, the boot disk of the Compute Engine instance and the + # persistent disk are encrypted using this encryption key. If + # this field is not set, the disks are encrypted using a generated + # key. Customer-managed encryption keys do not protect disk metadata. + # + # If the customer-managed encryption key is rotated, when the workstation + # instance is stopped, the system attempts to recreate the + # persistent disk with the new version of the key. Be sure to keep + # older versions of the key until the persistent disk is recreated. + # Otherwise, data on the persistent disk might be lost. + # + # If the encryption key is revoked, the workstation session automatically + # stops within 7 hours. + # + # Immutable after the workstation configuration is created. + # @!attribute [rw] readiness_checks + # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::ReadinessCheck>] + # Optional. Readiness checks to perform when starting a workstation using + # this workstation configuration. Mark a workstation as running only after + # all specified readiness checks return 200 status codes. + # @!attribute [rw] replica_zones + # @return [::Array<::String>] + # Optional. Immutable. Specifies the zones used to replicate the VM and disk + # resources within the region. If set, exactly two zones within the + # workstation cluster's region must be specified—for example, + # `['us-central1-a', 'us-central1-f']`. If this field is empty, two default + # zones within the region are used. + # + # Immutable after the workstation configuration is created. + # @!attribute [r] degraded + # @return [::Boolean] + # Output only. Whether this resource is degraded, in which case it may + # require user action to restore full functionality. See also the + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#conditions conditions} + # field. + # @!attribute [r] conditions + # @return [::Array<::Google::Rpc::Status>] + # Output only. Status conditions describing the current resource state. + # @!attribute [rw] enable_audit_agent + # @return [::Boolean] + # Optional. Whether to enable Linux `auditd` logging on the workstation. When + # enabled, a service account must also be specified that has + # `logging.buckets.write` permission on the project. Operating system audit + # logging is distinct from [Cloud Audit + # Logs](https://cloud.google.com/workstations/docs/audit-logging). + class WorkstationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Runtime host for a workstation. + # @!attribute [rw] gce_instance + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance] + # Specifies a Compute Engine instance as the host. + class Host + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A runtime using a Compute Engine instance. + # @!attribute [rw] machine_type + # @return [::String] + # Optional. The type of machine to use for VM instances—for example, + # `"e2-standard-4"`. For more information about machine types that + # Cloud Workstations supports, see the list of + # [available machine + # types](https://cloud.google.com/workstations/docs/available-machine-types). + # @!attribute [rw] service_account + # @return [::String] + # Optional. The email address of the service account for Cloud + # Workstations VMs created with this configuration. When specified, be + # sure that the service account has `logginglogEntries.create` permission + # on the project so it can write logs out to Cloud Logging. If using a + # custom container image, the service account must have permissions to + # pull the specified image. + # + # If you as the administrator want to be able to `ssh` into the + # underlying VM, you need to set this value to a service account + # for which you have the `iam.serviceAccounts.actAs` permission. + # Conversely, if you don't want anyone to be able to `ssh` into the + # underlying VM, use a service account where no one has that + # permission. + # + # If not set, VMs run with a service account provided by the + # Cloud Workstations service, and the image must be publicly + # accessible. + # @!attribute [rw] service_account_scopes + # @return [::Array<::String>] + # Optional. Scopes to grant to the + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance#service_account service_account}. + # Various scopes are automatically added based on feature usage. When + # specified, users of workstations under this configuration must have + # `iam.serviceAccounts.actAs` on the service account. + # @!attribute [rw] tags + # @return [::Array<::String>] + # Optional. Network tags to add to the Compute Engine VMs backing the + # workstations. This option applies + # [network + # tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs + # created with this configuration. These network tags enable the creation + # of [firewall + # rules](https://cloud.google.com/workstations/docs/configure-firewall-rules). + # @!attribute [rw] pool_size + # @return [::Integer] + # Optional. The number of VMs that the system should keep idle so that + # new workstations can be started quickly for new users. Defaults to `0` + # in the API. + # @!attribute [r] pooled_instances + # @return [::Integer] + # Output only. Number of instances currently available in the pool for + # faster workstation startup. + # @!attribute [rw] disable_public_ip_addresses + # @return [::Boolean] + # Optional. When set to true, disables public IP addresses for VMs. If + # you disable public IP addresses, you must set up Private Google Access + # or Cloud NAT on your network. If you use Private Google Access and you + # use `private.googleapis.com` or `restricted.googleapis.com` for + # Container Registry and Artifact Registry, make sure that you set + # up DNS records for domains `*.gcr.io` and `*.pkg.dev`. + # Defaults to false (VMs have public IP addresses). + # @!attribute [rw] enable_nested_virtualization + # @return [::Boolean] + # Optional. Whether to enable nested virtualization on Cloud Workstations + # VMs created under this workstation configuration. + # + # Nested virtualization lets you run virtual machine (VM) instances + # inside your workstation. Before enabling nested virtualization, + # consider the following important considerations. Cloud Workstations + # instances are subject to the [same restrictions as Compute Engine + # instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): + # + # * **Organization policy**: projects, folders, or + # organizations may be restricted from creating nested VMs if the + # **Disable VM nested virtualization** constraint is enforced in + # the organization policy. For more information, see the + # Compute Engine section, + # [Checking whether nested virtualization is + # allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). + # * **Performance**: nested VMs might experience a 10% or greater + # decrease in performance for workloads that are CPU-bound and + # possibly greater than a 10% decrease for workloads that are + # input/output bound. + # * **Machine Type**: nested virtualization can only be enabled on + # workstation configurations that specify a + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance#machine_type machine_type} + # in the N1 or N2 machine series. + # * **GPUs**: nested virtualization may not be enabled on workstation + # configurations with accelerators. + # * **Operating System**: Because + # [Container-Optimized + # OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) + # does not support nested virtualization, when nested virtualization is + # enabled, the underlying Compute Engine VM instances boot from an + # [Ubuntu + # LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) + # image. + # @!attribute [rw] shielded_instance_config + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::GceShieldedInstanceConfig] + # Optional. A set of Compute Engine Shielded instance options. + # @!attribute [rw] confidential_instance_config + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::GceConfidentialInstanceConfig] + # Optional. A set of Compute Engine Confidential VM instance options. + # @!attribute [rw] boot_disk_size_gb + # @return [::Integer] + # Optional. The size of the boot disk for the VM in gigabytes (GB). + # The minimum boot disk size is `30` GB. Defaults to `50` GB. + # @!attribute [rw] accelerators + # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::Accelerator>] + # Optional. A list of the type and count of accelerator cards attached to + # the instance. + class GceInstance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A set of Compute Engine Shielded instance options. + # @!attribute [rw] enable_secure_boot + # @return [::Boolean] + # Optional. Whether the instance has Secure Boot enabled. + # @!attribute [rw] enable_vtpm + # @return [::Boolean] + # Optional. Whether the instance has the vTPM enabled. + # @!attribute [rw] enable_integrity_monitoring + # @return [::Boolean] + # Optional. Whether the instance has integrity monitoring enabled. + class GceShieldedInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A set of Compute Engine Confidential VM instance options. + # @!attribute [rw] enable_confidential_compute + # @return [::Boolean] + # Optional. Whether the instance has confidential compute enabled. + class GceConfidentialInstanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # An accelerator card attached to the instance. + # @!attribute [rw] type + # @return [::String] + # Optional. Type of accelerator resource to attach to the instance, for + # example, + # `"nvidia-tesla-p100"`. + # @!attribute [rw] count + # @return [::Integer] + # Optional. Number of accelerator cards exposed to the instance. + class Accelerator + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # A directory to persist across workstation sessions. + # @!attribute [rw] gce_pd + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] + # A PersistentDirectory backed by a Compute Engine persistent disk. + # @!attribute [rw] mount_path + # @return [::String] + # Optional. Location of this directory in the running workstation. + class PersistentDirectory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A PersistentDirectory backed by a Compute Engine regional persistent + # disk. The + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#persistent_directories persistent_directories} + # field is repeated, but it may contain only one entry. It creates a + # [persistent + # disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that + # mounts to the workstation VM at `/home` when the session starts and + # detaches when the session ends. If this field is empty, workstations + # created with this configuration do not have a persistent home + # directory. + # @!attribute [rw] size_gb + # @return [::Integer] + # Optional. The GB capacity of a persistent home directory for each + # workstation created with this configuration. Must be empty if + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot source_snapshot} + # is set. + # + # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. + # Defaults to `200`. If less than `200` GB, the + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#disk_type disk_type} + # must be + # `"pd-balanced"` or `"pd-ssd"`. + # @!attribute [rw] fs_type + # @return [::String] + # Optional. Type of file system that the disk should be formatted with. + # The workstation image must support this file system type. Must be empty + # if + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot source_snapshot} + # is set. Defaults to `"ext4"`. + # @!attribute [rw] disk_type + # @return [::String] + # Optional. The [type of the persistent + # disk](https://cloud.google.com/compute/docs/disks#disk-types) for the + # home directory. Defaults to `"pd-standard"`. + # @!attribute [rw] source_snapshot + # @return [::String] + # Optional. Name of the snapshot to use as the source for the disk. If + # set, + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#size_gb size_gb} + # and + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#fs_type fs_type} + # must be empty. + # @!attribute [rw] reclaim_policy + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy] + # Optional. Whether the persistent disk should be deleted when the + # workstation is deleted. Valid values are `DELETE` and `RETAIN`. + # Defaults to `DELETE`. + class GceRegionalPersistentDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Value representing what should happen to the disk after the workstation + # is deleted. + module ReclaimPolicy + # Do not use. + RECLAIM_POLICY_UNSPECIFIED = 0 + + # Delete the persistent disk when deleting the workstation. + DELETE = 1 + + # Keep the persistent disk when deleting the workstation. + # An administrator must manually delete the disk. + RETAIN = 2 + end + end + end + + # An ephemeral directory which won't persist across workstation sessions. It + # is freshly created on every workstation start operation. + # @!attribute [rw] gce_pd + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk] + # An EphemeralDirectory backed by a Compute Engine persistent disk. + # @!attribute [rw] mount_path + # @return [::String] + # Required. Location of this directory in the running workstation. + class EphemeralDirectory + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An EphemeralDirectory is backed by a Compute Engine persistent disk. + # @!attribute [rw] disk_type + # @return [::String] + # Optional. Type of the disk to use. Defaults to `"pd-standard"`. + # @!attribute [rw] source_snapshot + # @return [::String] + # Optional. Name of the snapshot to use as the source for the disk. Must + # be empty if + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} + # is set. Updating + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} + # will update content in the ephemeral directory after the workstation is + # restarted. This field is mutable. + # @!attribute [rw] source_image + # @return [::String] + # Optional. Name of the disk image to use as the source for the disk. + # Must be empty if + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} + # is set. Updating + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} + # will update content in the ephemeral directory after the workstation is + # restarted. This field is mutable. + # @!attribute [rw] read_only + # @return [::Boolean] + # Optional. Whether the disk is read only. If true, the disk may be + # shared by multiple VMs and + # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} + # must be set. + class GcePersistentDisk + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A Docker container. + # @!attribute [rw] image + # @return [::String] + # Optional. A Docker container image that defines a custom environment. + # + # Cloud Workstations provides a number of + # [preconfigured + # images](https://cloud.google.com/workstations/docs/preconfigured-base-images), + # but you can create your own + # [custom container + # images](https://cloud.google.com/workstations/docs/custom-container-images). + # If using a private image, the `host.gceInstance.serviceAccount` field + # must be specified in the workstation configuration and must have + # permission to pull the specified image. Otherwise, the image must be + # publicly accessible. + # @!attribute [rw] command + # @return [::Array<::String>] + # Optional. If set, overrides the default ENTRYPOINT specified by the + # image. + # @!attribute [rw] args + # @return [::Array<::String>] + # Optional. Arguments passed to the entrypoint. + # @!attribute [rw] env + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Environment variables passed to the container's entrypoint. + # @!attribute [rw] working_dir + # @return [::String] + # Optional. If set, overrides the default DIR specified by the image. + # @!attribute [rw] run_as_user + # @return [::Integer] + # Optional. If set, overrides the USER specified in the image with the + # given uid. + class Container + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class EnvEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A customer-managed encryption key (CMEK) for the Compute Engine + # resources of the associated workstation configuration. Specify the name of + # your Cloud KMS encryption key and the default service account. + # We recommend that you use a separate service account and follow + # [Cloud KMS best + # practices](https://cloud.google.com/kms/docs/separation-of-duties). + # @!attribute [rw] kms_key + # @return [::String] + # Immutable. The name of the Google Cloud KMS encryption key. For example, + # `"projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME"`. + # The key must be in the same region as the workstation configuration. + # @!attribute [rw] kms_key_service_account + # @return [::String] + # Immutable. The service account to use with the specified + # KMS key. We recommend that you use a separate service account + # and follow KMS best practices. For more information, see + # [Separation of + # duties](https://cloud.google.com/kms/docs/separation-of-duties) and + # `gcloud kms keys add-iam-policy-binding` + # [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member). + class CustomerEncryptionKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A readiness check to be performed on a workstation. + # @!attribute [rw] path + # @return [::String] + # Optional. Path to which the request should be sent. + # @!attribute [rw] port + # @return [::Integer] + # Optional. Port to which the request should be sent. + class ReadinessCheck + 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 + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class LabelsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A single instance of a developer workstation with its own persistent storage. + # @!attribute [rw] name + # @return [::String] + # Full name of this workstation. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human-readable name for this workstation. + # @!attribute [r] uid + # @return [::String] + # Output only. A system-assigned unique identifier for this workstation. + # @!attribute [r] reconciling + # @return [::Boolean] + # Output only. Indicates whether this workstation is currently being updated + # to match its intended state. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Client-specified annotations. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. + # [Labels](https://cloud.google.com/workstations/docs/label-resources) that + # are applied to the workstation and that are also propagated to the + # underlying Compute Engine resources. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation was most recently updated. + # @!attribute [r] start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation was most recently successfully + # started, regardless of the workstation's initial state. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this workstation was soft-deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. Checksum computed by the server. May be sent on update and delete + # requests to make sure that the client has an up-to-date value before + # proceeding. + # @!attribute [r] state + # @return [::Google::Cloud::Workstations::V1beta::Workstation::State] + # Output only. Current state of the workstation. + # @!attribute [r] host + # @return [::String] + # Output only. Host to which clients can send HTTPS traffic that will be + # received by the workstation. Authorized traffic will be received to the + # workstation as HTTP on port 80. To send traffic to a different port, + # clients may prefix the host with the destination port in the format + # `{port}-{host}`. + # @!attribute [rw] env + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Environment variables passed to the workstation container's + # entrypoint. + class Workstation + 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 + + # @!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 EnvEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Whether a workstation is running and ready to receive user requests. + module State + # Do not use. + STATE_UNSPECIFIED = 0 + + # The workstation is not yet ready to accept requests from users but will + # be soon. + STATE_STARTING = 1 + + # The workstation is ready to accept requests from users. + STATE_RUNNING = 2 + + # The workstation is being stopped. + STATE_STOPPING = 3 + + # The workstation is stopped and will not be able to receive requests until + # it is started. + STATE_STOPPED = 4 + end + end + + # Request message for GetWorkstationCluster. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested resource. + class GetWorkstationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListWorkstationClusters. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListWorkstationClustersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListWorkstationClusters. + # @!attribute [rw] workstation_clusters + # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationCluster>] + # The requested workstation clusters. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. + class ListWorkstationClustersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a CreateWorkstationCluster. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] workstation_cluster_id + # @return [::String] + # Required. ID to use for the workstation cluster. + # @!attribute [rw] workstation_cluster + # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] + # Required. Workstation cluster to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + class CreateWorkstationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateWorkstationCluster. + # @!attribute [rw] workstation_cluster + # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] + # Required. Workstation cluster to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask that specifies which fields in the workstation cluster + # should be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set, and the workstation cluster is not found, a new + # workstation cluster will be created. In this situation, update_mask is + # ignored. + class UpdateWorkstationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a workstation cluster. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation cluster to delete. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation cluster on the server does not have this ETag. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set, any workstation configurations and workstations in the + # workstation cluster are also deleted. Otherwise, the request only + # works if the workstation cluster has no configurations or workstations. + class DeleteWorkstationClusterRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetWorkstationConfig. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested resource. + class GetWorkstationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListWorkstationConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListWorkstationConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListWorkstationConfigs. + # @!attribute [rw] workstation_configs + # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] + # The requested configs. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. + class ListWorkstationConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListUsableWorkstationConfigs. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListUsableWorkstationConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListUsableWorkstationConfigs. + # @!attribute [rw] workstation_configs + # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] + # The requested configs. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. + class ListUsableWorkstationConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a CreateWorkstationConfig. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] workstation_config_id + # @return [::String] + # Required. ID to use for the workstation configuration. + # @!attribute [rw] workstation_config + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] + # Required. Config to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + class CreateWorkstationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateWorkstationConfig. + # @!attribute [rw] workstation_config + # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] + # Required. Config to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration will be created. In this situation, + # update_mask is ignored. + class UpdateWorkstationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for deleting a workstation configuration. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation configuration to delete. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request is rejected if the latest version of the + # workstation configuration on the server does not have this ETag. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set, any workstations in the workstation configuration are + # also deleted. Otherwise, the request works only if the workstation + # configuration has no workstations. + class DeleteWorkstationConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetWorkstation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the requested resource. + class GetWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListWorkstations. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListWorkstationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListWorkstations. + # @!attribute [rw] workstations + # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation>] + # The requested workstations. + # @!attribute [rw] next_page_token + # @return [::String] + # Optional. 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>] + # Optional. Unreachable resources. + class ListWorkstationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListUsableWorkstations. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # Optional. next_page_token value returned from a previous List request, if + # any. + class ListUsableWorkstationsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListUsableWorkstations. + # @!attribute [rw] workstations + # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation>] + # The requested workstations. + # @!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. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources. + class ListUsableWorkstationsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message for creating a CreateWorkstation. + # @!attribute [rw] parent + # @return [::String] + # Required. Parent resource name. + # @!attribute [rw] workstation_id + # @return [::String] + # Required. ID to use for the workstation. + # @!attribute [rw] workstation + # @return [::Google::Cloud::Workstations::V1beta::Workstation] + # Required. Workstation to create. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + class CreateWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateWorkstation. + # @!attribute [rw] workstation + # @return [::Google::Cloud::Workstations::V1beta::Workstation] + # Required. Workstation to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask specifying which fields in the workstation configuration + # should be updated. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set and the workstation configuration is not found, a new + # workstation configuration is created. In this situation, update_mask + # is ignored. + class UpdateWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteWorkstation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation to delete. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + class DeleteWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for StartWorkstation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation to start. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + class StartWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for StopWorkstation. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the workstation to stop. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # actually apply it. + # @!attribute [rw] etag + # @return [::String] + # Optional. If set, the request will be rejected if the latest version of the + # workstation on the server does not have this ETag. + class StopWorkstationRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GenerateAccessToken. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Desired expiration time of the access token. This value must + # be at most 24 hours in the future. If a value is not specified, the + # token's expiration time will be set to a default value of 1 hour in the + # future. + # + # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ttl + # @return [::Google::Protobuf::Duration] + # Desired lifetime duration of the access token. This value must + # be at most 24 hours. If a value is not specified, the token's lifetime + # will be set to a default value of 1 hour. + # + # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] workstation + # @return [::String] + # Required. Name of the workstation for which the access token should be + # generated. + class GenerateAccessTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for GenerateAccessToken. + # @!attribute [rw] access_token + # @return [::String] + # The generated bearer access token. To use this token, include it in an + # Authorization header of an HTTP request sent to the associated + # workstation's hostname—for example, `Authorization: Bearer + # `. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Time at which the generated token will expire. + class GenerateAccessTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for long-running operations. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time that the operation was created. + # @!attribute [r] end_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time that 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. + # @!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-workstations-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb @@ -0,0 +1,229 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # `FieldMask` represents a set of symbolic field paths, for example: + # + # paths: "f.a" + # paths: "f.b.d" + # + # Here `f` represents a field in some root message, `a` and `b` + # fields in the message found in `f`, and `d` a field found in the + # message in `f.b`. + # + # Field masks are used to specify a subset of fields that should be + # returned by a get operation or modified by an update operation. + # Field masks also have a custom JSON encoding (see below). + # + # # Field Masks in Projections + # + # When used in the context of a projection, a response message or + # sub-message is filtered by the API to only contain those fields as + # specified in the mask. For example, if the mask in the previous + # example is applied to a response message as follows: + # + # f { + # a : 22 + # b { + # d : 1 + # x : 2 + # } + # y : 13 + # } + # z: 8 + # + # The result will not contain specific values for fields x,y and z + # (their value will be set to the default, and omitted in proto text + # output): + # + # + # f { + # a : 22 + # b { + # d : 1 + # } + # } + # + # A repeated field is not allowed except at the last position of a + # paths string. + # + # If a FieldMask object is not present in a get operation, the + # operation applies to all fields (as if a FieldMask of all fields + # had been specified). + # + # Note that a field mask does not necessarily apply to the + # top-level response message. In case of a REST get operation, the + # field mask applies directly to the response, but in case of a REST + # list operation, the mask instead applies to each individual message + # in the returned resource list. In case of a REST custom method, + # other definitions may be used. Where the mask applies will be + # clearly documented together with its declaration in the API. In + # any case, the effect on the returned resource/resources is required + # behavior for APIs. + # + # # Field Masks in Update Operations + # + # A field mask in update operations specifies which fields of the + # targeted resource are going to be updated. The API is required + # to only change the values of the fields as specified in the mask + # and leave the others untouched. If a resource is passed in to + # describe the updated values, the API ignores the values of all + # fields not covered by the mask. + # + # If a repeated field is specified for an update operation, new values will + # be appended to the existing repeated field in the target resource. Note that + # a repeated field is only allowed in the last position of a `paths` string. + # + # If a sub-message is specified in the last position of the field mask for an + # update operation, then new value will be merged into the existing sub-message + # in the target resource. + # + # For example, given the target message: + # + # f { + # b { + # d: 1 + # x: 2 + # } + # c: [1] + # } + # + # And an update message: + # + # f { + # b { + # d: 10 + # } + # c: [2] + # } + # + # then if the field mask is: + # + # paths: ["f.b", "f.c"] + # + # then the result will be: + # + # f { + # b { + # d: 10 + # x: 2 + # } + # c: [1, 2] + # } + # + # An implementation may provide options to override this default behavior for + # repeated and message fields. + # + # In order to reset a field's value to the default, the field must + # be in the mask and set to the default value in the provided resource. + # Hence, in order to reset all fields of a resource, provide a default + # instance of the resource and set all fields in the mask, or do + # not provide a mask as described below. + # + # If a field mask is not present on update, the operation applies to + # all fields (as if a field mask of all fields has been specified). + # Note that in the presence of schema evolution, this may mean that + # fields the client does not know and has therefore not filled into + # the request will be reset to their default. If this is unwanted + # behavior, a specific service may require a client to always specify + # a field mask, producing an error if not. + # + # As with get operations, the location of the resource which + # describes the updated values in the request message depends on the + # operation kind. In any case, the effect of the field mask is + # required to be honored by the API. + # + # ## Considerations for HTTP REST + # + # The HTTP kind of an update operation which uses a field mask must + # be set to PATCH instead of PUT in order to satisfy HTTP semantics + # (PUT must only be used for full updates). + # + # # JSON Encoding of Field Masks + # + # In JSON, a field mask is encoded as a single string where paths are + # separated by a comma. Fields name in each path are converted + # to/from lower-camel naming conventions. + # + # As an example, consider the following message declarations: + # + # message Profile { + # User user = 1; + # Photo photo = 2; + # } + # message User { + # string display_name = 1; + # string address = 2; + # } + # + # In proto a field mask for `Profile` may look as such: + # + # mask { + # paths: "user.display_name" + # paths: "photo" + # } + # + # In JSON, the same mask is represented as below: + # + # { + # mask: "user.displayName,photo" + # } + # + # # Field Masks and Oneof Fields + # + # Field masks treat fields in oneofs just as regular fields. Consider the + # following message: + # + # message SampleMessage { + # oneof test_oneof { + # string name = 4; + # SubMessage sub_message = 9; + # } + # } + # + # The field mask can be: + # + # mask { + # paths: "name" + # } + # + # Or: + # + # mask { + # paths: "sub_message" + # } + # + # Note that oneof type names ("test_oneof" in this case) cannot be used in + # paths. + # + # ## Field Mask Verification + # + # The implementation of any API method which has a FieldMask type field in the + # request should verify the included field paths, and return an + # `INVALID_ARGUMENT` error if any path is unmappable. + # @!attribute [rw] paths + # @return [::Array<::String>] + # The set of field mask paths. + class FieldMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/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-workstations-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/Gemfile new file mode 100644 index 000000000000..7a19ba50a0c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta", path: "../" +else + gem "google-cloud-workstations-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-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json new file mode 100644 index 000000000000..46f10e2bfde3 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json @@ -0,0 +1,815 @@ +{ + "client_library": { + "name": "google-cloud-workstations-v1beta", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.workstations.v1beta", + "version": "v1beta" + } + ] + }, + "snippets": [ + { + "region_tag": "workstations_v1beta_generated_Workstations_GetWorkstationCluster_sync", + "title": "Snippet for the get_workstation_cluster call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_cluster.", + "file": "workstations/get_workstation_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workstation_cluster", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1beta::WorkstationCluster", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "GetWorkstationCluster", + "full_name": "google.cloud.workstations.v1beta.Workstations.GetWorkstationCluster", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_ListWorkstationClusters_sync", + "title": "Snippet for the list_workstation_clusters call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_clusters.", + "file": "workstations/list_workstation_clusters.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workstation_clusters", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_clusters", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "ListWorkstationClusters", + "full_name": "google.cloud.workstations.v1beta.Workstations.ListWorkstationClusters", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_CreateWorkstationCluster_sync", + "title": "Snippet for the create_workstation_cluster call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_cluster.", + "file": "workstations/create_workstation_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workstation_cluster", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "CreateWorkstationCluster", + "full_name": "google.cloud.workstations.v1beta.Workstations.CreateWorkstationCluster", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_UpdateWorkstationCluster_sync", + "title": "Snippet for the update_workstation_cluster call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_cluster.", + "file": "workstations/update_workstation_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workstation_cluster", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "UpdateWorkstationCluster", + "full_name": "google.cloud.workstations.v1beta.Workstations.UpdateWorkstationCluster", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_DeleteWorkstationCluster_sync", + "title": "Snippet for the delete_workstation_cluster call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_cluster.", + "file": "workstations/delete_workstation_cluster.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workstation_cluster", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_cluster", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "DeleteWorkstationCluster", + "full_name": "google.cloud.workstations.v1beta.Workstations.DeleteWorkstationCluster", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_GetWorkstationConfig_sync", + "title": "Snippet for the get_workstation_config call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_config.", + "file": "workstations/get_workstation_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workstation_config", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1beta::WorkstationConfig", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "GetWorkstationConfig", + "full_name": "google.cloud.workstations.v1beta.Workstations.GetWorkstationConfig", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_ListWorkstationConfigs_sync", + "title": "Snippet for the list_workstation_configs call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_configs.", + "file": "workstations/list_workstation_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workstation_configs", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "ListWorkstationConfigs", + "full_name": "google.cloud.workstations.v1beta.Workstations.ListWorkstationConfigs", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_ListUsableWorkstationConfigs_sync", + "title": "Snippet for the list_usable_workstation_configs call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstation_configs.", + "file": "workstations/list_usable_workstation_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_usable_workstation_configs", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstation_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "ListUsableWorkstationConfigs", + "full_name": "google.cloud.workstations.v1beta.Workstations.ListUsableWorkstationConfigs", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_CreateWorkstationConfig_sync", + "title": "Snippet for the create_workstation_config call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_config.", + "file": "workstations/create_workstation_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workstation_config", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "CreateWorkstationConfig", + "full_name": "google.cloud.workstations.v1beta.Workstations.CreateWorkstationConfig", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_UpdateWorkstationConfig_sync", + "title": "Snippet for the update_workstation_config call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_config.", + "file": "workstations/update_workstation_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workstation_config", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "UpdateWorkstationConfig", + "full_name": "google.cloud.workstations.v1beta.Workstations.UpdateWorkstationConfig", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_DeleteWorkstationConfig_sync", + "title": "Snippet for the delete_workstation_config call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_config.", + "file": "workstations/delete_workstation_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workstation_config", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "DeleteWorkstationConfig", + "full_name": "google.cloud.workstations.v1beta.Workstations.DeleteWorkstationConfig", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_GetWorkstation_sync", + "title": "Snippet for the get_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation.", + "file": "workstations/get_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_workstation", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::GetWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1beta::Workstation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "GetWorkstation", + "full_name": "google.cloud.workstations.v1beta.Workstations.GetWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_ListWorkstations_sync", + "title": "Snippet for the list_workstations call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstations.", + "file": "workstations/list_workstations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_workstations", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "ListWorkstations", + "full_name": "google.cloud.workstations.v1beta.Workstations.ListWorkstations", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_ListUsableWorkstations_sync", + "title": "Snippet for the list_usable_workstations call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstations.", + "file": "workstations/list_usable_workstations.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_usable_workstations", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstations", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "ListUsableWorkstations", + "full_name": "google.cloud.workstations.v1beta.Workstations.ListUsableWorkstations", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_CreateWorkstation_sync", + "title": "Snippet for the create_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation.", + "file": "workstations/create_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_workstation", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "CreateWorkstation", + "full_name": "google.cloud.workstations.v1beta.Workstations.CreateWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_UpdateWorkstation_sync", + "title": "Snippet for the update_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation.", + "file": "workstations/update_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_workstation", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "UpdateWorkstation", + "full_name": "google.cloud.workstations.v1beta.Workstations.UpdateWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_DeleteWorkstation_sync", + "title": "Snippet for the delete_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation.", + "file": "workstations/delete_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_workstation", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "DeleteWorkstation", + "full_name": "google.cloud.workstations.v1beta.Workstations.DeleteWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_StartWorkstation_sync", + "title": "Snippet for the start_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#start_workstation.", + "file": "workstations/start_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "start_workstation", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#start_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::StartWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "StartWorkstation", + "full_name": "google.cloud.workstations.v1beta.Workstations.StartWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_StopWorkstation_sync", + "title": "Snippet for the stop_workstation call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#stop_workstation.", + "file": "workstations/stop_workstation.rb", + "language": "RUBY", + "client_method": { + "short_name": "stop_workstation", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#stop_workstation", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::StopWorkstationRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "StopWorkstation", + "full_name": "google.cloud.workstations.v1beta.Workstations.StopWorkstation", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "workstations_v1beta_generated_Workstations_GenerateAccessToken_sync", + "title": "Snippet for the generate_access_token call in the Workstations service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#generate_access_token.", + "file": "workstations/generate_access_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_access_token", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#generate_access_token", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse", + "client": { + "short_name": "Workstations::Client", + "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" + }, + "method": { + "short_name": "GenerateAccessToken", + "full_name": "google.cloud.workstations.v1beta.Workstations.GenerateAccessToken", + "service": { + "short_name": "Workstations", + "full_name": "google.cloud.workstations.v1beta.Workstations" + } + } + }, + "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-workstations-v1beta/snippets/workstations/create_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb new file mode 100644 index 000000000000..d693d2b46ae5 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_CreateWorkstation_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the create_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation. +# +def create_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new + + # Call the create_workstation method. + result = client.create_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_CreateWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb new file mode 100644 index 000000000000..87128b5c9ea7 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_CreateWorkstationCluster_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the create_workstation_cluster call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_cluster. +# +def create_workstation_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new + + # Call the create_workstation_cluster method. + result = client.create_workstation_cluster request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_CreateWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb new file mode 100644 index 000000000000..f2b1d8cd72ce --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_CreateWorkstationConfig_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the create_workstation_config call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_config. +# +def create_workstation_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new + + # Call the create_workstation_config method. + result = client.create_workstation_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_CreateWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb new file mode 100644 index 000000000000..5077d7921393 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_DeleteWorkstation_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the delete_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation. +# +def delete_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new + + # Call the delete_workstation method. + result = client.delete_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_DeleteWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb new file mode 100644 index 000000000000..102ab70aae42 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_DeleteWorkstationCluster_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the delete_workstation_cluster call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_cluster. +# +def delete_workstation_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new + + # Call the delete_workstation_cluster method. + result = client.delete_workstation_cluster request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_DeleteWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb new file mode 100644 index 000000000000..9ad29224664b --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_DeleteWorkstationConfig_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the delete_workstation_config call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_config. +# +def delete_workstation_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new + + # Call the delete_workstation_config method. + result = client.delete_workstation_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_DeleteWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb new file mode 100644 index 000000000000..c810256cd2e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_GenerateAccessToken_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the generate_access_token call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#generate_access_token. +# +def generate_access_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new + + # Call the generate_access_token method. + result = client.generate_access_token request + + # The returned object is of type Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse. + p result +end +# [END workstations_v1beta_generated_Workstations_GenerateAccessToken_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb new file mode 100644 index 000000000000..ed645c9c161d --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_GetWorkstation_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the get_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation. +# +def get_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new + + # Call the get_workstation method. + result = client.get_workstation request + + # The returned object is of type Google::Cloud::Workstations::V1beta::Workstation. + p result +end +# [END workstations_v1beta_generated_Workstations_GetWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb new file mode 100644 index 000000000000..665a6a0fe884 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_GetWorkstationCluster_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the get_workstation_cluster call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_cluster. +# +def get_workstation_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new + + # Call the get_workstation_cluster method. + result = client.get_workstation_cluster request + + # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationCluster. + p result +end +# [END workstations_v1beta_generated_Workstations_GetWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb new file mode 100644 index 000000000000..df2764fba5d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_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 workstations_v1beta_generated_Workstations_GetWorkstationConfig_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the get_workstation_config call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_config. +# +def get_workstation_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new + + # Call the get_workstation_config method. + result = client.get_workstation_config request + + # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationConfig. + p result +end +# [END workstations_v1beta_generated_Workstations_GetWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb new file mode 100644 index 000000000000..04c759f7d070 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_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 workstations_v1beta_generated_Workstations_ListUsableWorkstationConfigs_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the list_usable_workstation_configs call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstation_configs. +# +def list_usable_workstation_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new + + # Call the list_usable_workstation_configs method. + result = client.list_usable_workstation_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::Workstations::V1beta::WorkstationConfig. + p item + end +end +# [END workstations_v1beta_generated_Workstations_ListUsableWorkstationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb new file mode 100644 index 000000000000..ac98db348987 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_ListUsableWorkstations_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the list_usable_workstations call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstations. +# +def list_usable_workstations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new + + # Call the list_usable_workstations method. + result = client.list_usable_workstations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. + p item + end +end +# [END workstations_v1beta_generated_Workstations_ListUsableWorkstations_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb new file mode 100644 index 000000000000..339e219b560c --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_ListWorkstationClusters_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the list_workstation_clusters call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_clusters. +# +def list_workstation_clusters + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new + + # Call the list_workstation_clusters method. + result = client.list_workstation_clusters request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Workstations::V1beta::WorkstationCluster. + p item + end +end +# [END workstations_v1beta_generated_Workstations_ListWorkstationClusters_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb new file mode 100644 index 000000000000..e048457320f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_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 workstations_v1beta_generated_Workstations_ListWorkstationConfigs_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the list_workstation_configs call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_configs. +# +def list_workstation_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new + + # Call the list_workstation_configs method. + result = client.list_workstation_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::Workstations::V1beta::WorkstationConfig. + p item + end +end +# [END workstations_v1beta_generated_Workstations_ListWorkstationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb new file mode 100644 index 000000000000..cdea490fd7b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_ListWorkstations_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the list_workstations call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstations. +# +def list_workstations + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new + + # Call the list_workstations method. + result = client.list_workstations request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. + p item + end +end +# [END workstations_v1beta_generated_Workstations_ListWorkstations_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb new file mode 100644 index 000000000000..4d0f92d6a22b --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_StartWorkstation_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the start_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#start_workstation. +# +def start_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new + + # Call the start_workstation method. + result = client.start_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_StartWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb new file mode 100644 index 000000000000..81426cbc8008 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_StopWorkstation_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the stop_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#stop_workstation. +# +def stop_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new + + # Call the stop_workstation method. + result = client.stop_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_StopWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb new file mode 100644 index 000000000000..5f5722b2f007 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_UpdateWorkstation_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the update_workstation call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation. +# +def update_workstation + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new + + # Call the update_workstation method. + result = client.update_workstation request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_UpdateWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb new file mode 100644 index 000000000000..9890ea125115 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_UpdateWorkstationCluster_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the update_workstation_cluster call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_cluster. +# +def update_workstation_cluster + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new + + # Call the update_workstation_cluster method. + result = client.update_workstation_cluster request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_UpdateWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb new file mode 100644 index 000000000000..659a518628ac --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START workstations_v1beta_generated_Workstations_UpdateWorkstationConfig_sync] +require "google/cloud/workstations/v1beta" + +## +# Snippet for the update_workstation_config call in the Workstations service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_config. +# +def update_workstation_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Workstations::V1beta::Workstations::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new + + # Call the update_workstation_config method. + result = client.update_workstation_config request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is how to wait for a response. + result.wait_until_done! timeout: 60 + if result.response? + p result.response + else + puts "No response received." + end +end +# [END workstations_v1beta_generated_Workstations_UpdateWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb new file mode 100644 index 000000000000..15f8d121ef95 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_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/workstations/v1beta/workstations_pb" +require "google/cloud/workstations/v1beta/workstations_services_pb" +require "google/cloud/workstations/v1beta/workstations" + +class ::Google::Cloud::Workstations::V1beta::Workstations::OperationsTest < Minitest::Test + class ClientStub + attr_accessor :call_rpc_count, :requests + + def initialize response, operation, &block + @response = response + @operation = operation + @block = block + @call_rpc_count = 0 + @requests = [] + end + + def call_rpc *args, **kwargs + @call_rpc_count += 1 + + @requests << @block&.call(*args, **kwargs) + + catch :response do + yield @response, @operation if block_given? + @response + end + end + + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_list_operations + # Create GRPC objects. + grpc_response = ::Google::Longrunning::ListOperationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + filter = "hello world" + page_size = 42 + page_token = "hello world" + return_partial_success = true + + list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_operations, name + assert_kind_of ::Google::Longrunning::ListOperationsRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["filter"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_operations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_operations_client_stub.call_rpc_count + end + end + + def test_get_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_operation, name + assert_kind_of ::Google::Longrunning::GetOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_operation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_operation({ name: name }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_operation name: name do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_operation({ name: name }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_operation_client_stub.call_rpc_count + end + end + + def test_delete_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_operation, name + assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_operation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_operation_client_stub.call_rpc_count + end + end + + def test_cancel_operation + # Create GRPC objects. + grpc_response = ::Google::Protobuf::Empty.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_operation, name + assert_kind_of ::Google::Longrunning::CancelOperationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_operation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_operation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_operation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_operation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_operation_client_stub.call_rpc_count + end + end + + def test_wait_operation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + timeout = {} + + wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :wait_operation, name + assert_kind_of ::Google::Longrunning::WaitOperationRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, wait_operation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.wait_operation({ name: name, timeout: timeout }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.wait_operation name: name, timeout: timeout do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, wait_operation_client_stub.call_rpc_count + end + end + + def test_configure + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + + client = block_config = config = nil + dummy_stub = ClientStub.new nil, nil + Gapic::ServiceStub.stub :new, dummy_stub do + client = ::Google::Cloud::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb new file mode 100644 index 000000000000..b909911491fb --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_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/workstations/v1beta/workstations" + +class ::Google::Cloud::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::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_workstation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workstation_path project: "value0", location: "value1", workstation_cluster: "value2", workstation_config: "value3", workstation: "value4" + assert_equal "projects/value0/locations/value1/workstationClusters/value2/workstationConfigs/value3/workstations/value4", path + end + end + + def test_workstation_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::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workstation_cluster_path project: "value0", location: "value1", workstation_cluster: "value2" + assert_equal "projects/value0/locations/value1/workstationClusters/value2", path + end + end + + def test_workstation_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::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workstation_config_path project: "value0", location: "value1", workstation_cluster: "value2", workstation_config: "value3" + assert_equal "projects/value0/locations/value1/workstationClusters/value2/workstationConfigs/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb new file mode 100644 index 000000000000..4700ae680eee --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb @@ -0,0 +1,1220 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License 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/workstations/v1beta/workstations_pb" +require "google/cloud/workstations/v1beta/workstations/rest" + + +class ::Google::Cloud::Workstations::V1beta::Workstations::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_workstation_cluster + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1beta::WorkstationCluster.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workstation_cluster({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workstation_cluster name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workstation_cluster ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workstation_cluster({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workstation_cluster(::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workstation_cluster_client_stub.call_count + end + end + end + + def test_list_workstation_clusters + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse.new + http_response = OpenStruct.new 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_workstation_clusters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_workstation_clusters_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workstation_clusters_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.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_workstation_clusters_client_stub.call_count + end + end + end + + def test_create_workstation_cluster + # Create test objects. + 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" + workstation_cluster_id = "hello world" + workstation_cluster = {} + validate_only = true + + create_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workstation_cluster parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workstation_cluster ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workstation_cluster(::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workstation_cluster_client_stub.call_count + end + end + end + + def test_update_workstation_cluster + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workstation_cluster = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workstation_cluster workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workstation_cluster ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workstation_cluster(::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workstation_cluster_client_stub.call_count + end + end + end + + def test_delete_workstation_cluster + # Create test objects. + 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" + validate_only = true + etag = "hello world" + force = true + + delete_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_cluster_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workstation_cluster name: name, validate_only: validate_only, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workstation_cluster ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workstation_cluster(::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workstation_cluster_client_stub.call_count + end + end + end + + def test_get_workstation_config + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1beta::WorkstationConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workstation_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workstation_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workstation_config ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workstation_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workstation_config(::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workstation_config_client_stub.call_count + end + end + end + + def test_list_workstation_configs + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse.new + http_response = OpenStruct.new 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_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_workstation_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workstation_configs_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.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_workstation_configs_client_stub.call_count + end + end + end + + def test_list_usable_workstation_configs + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse.new + http_response = OpenStruct.new 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_usable_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_usable_workstation_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_usable_workstation_configs_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_usable_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_usable_workstation_configs ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_usable_workstation_configs(::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.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_usable_workstation_configs_client_stub.call_count + end + end + end + + def test_create_workstation_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workstation_config_id = "hello world" + workstation_config = {} + validate_only = true + + create_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workstation_config parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workstation_config ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workstation_config(::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workstation_config_client_stub.call_count + end + end + end + + def test_update_workstation_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workstation_config = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workstation_config workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workstation_config ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workstation_config(::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workstation_config_client_stub.call_count + end + end + end + + def test_delete_workstation_config + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workstation_config name: name, validate_only: validate_only, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workstation_config ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workstation_config(::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workstation_config_client_stub.call_count + end + end + end + + def test_get_workstation + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1beta::Workstation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_workstation({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_workstation name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_workstation ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_workstation({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_workstation(::Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_workstation_client_stub.call_count + end + end + end + + def test_list_workstations + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse.new + http_response = OpenStruct.new 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_workstations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_workstations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_workstations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_workstations parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.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_workstations_client_stub.call_count + end + end + end + + def test_list_usable_workstations + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse.new + http_response = OpenStruct.new 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_usable_workstations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_usable_workstations_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_usable_workstations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_usable_workstations parent: parent, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_usable_workstations ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_usable_workstations(::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.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_usable_workstations_client_stub.call_count + end + end + end + + def test_create_workstation + # Create test objects. + 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" + workstation_id = "hello world" + workstation = {} + validate_only = true + + create_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_workstation parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_workstation ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_workstation(::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_workstation_client_stub.call_count + end + end + end + + def test_update_workstation + # Create test objects. + client_result = ::Google::Longrunning::Operation.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + workstation = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_workstation({ workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_workstation workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_workstation ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_workstation({ workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_workstation(::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_workstation_client_stub.call_count + end + end + end + + def test_delete_workstation + # Create test objects. + 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" + validate_only = true + etag = "hello world" + + delete_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_workstation ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_workstation(::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_workstation_client_stub.call_count + end + end + end + + def test_start_workstation + # Create test objects. + 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" + validate_only = true + etag = "hello world" + + start_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_start_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, start_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.start_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.start_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.start_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, start_workstation_client_stub.call_count + end + end + end + + def test_stop_workstation + # Create test objects. + 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" + validate_only = true + etag = "hello world" + + stop_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_stop_workstation_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, stop_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.stop_workstation ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.stop_workstation(::Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, stop_workstation_client_stub.call_count + end + end + end + + def test_generate_access_token + # Create test objects. + client_result = ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + expire_time = {} + workstation = "hello world" + + generate_access_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_generate_access_token_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_access_token_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_access_token({ expire_time: expire_time, workstation: workstation }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_access_token expire_time: expire_time, workstation: workstation do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_access_token({ expire_time: expire_time, workstation: workstation }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_access_token_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::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb new file mode 100644 index 000000000000..f211534d13c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb @@ -0,0 +1,1441 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" + +require "gapic/grpc/service_stub" + +require "google/cloud/workstations/v1beta/workstations_pb" +require "google/cloud/workstations/v1beta/workstations" + +class ::Google::Cloud::Workstations::V1beta::Workstations::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_workstation_cluster + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1beta::WorkstationCluster.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workstation_cluster, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workstation_cluster({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workstation_cluster name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workstation_cluster ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workstation_cluster({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workstation_cluster(::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workstation_cluster_client_stub.call_rpc_count + end + end + + def test_list_workstation_clusters + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstation_clusters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workstation_clusters, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest, 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_workstation_clusters_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.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_workstation_clusters_client_stub.call_rpc_count + end + end + + def test_create_workstation_cluster + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workstation_cluster_id = "hello world" + workstation_cluster = {} + validate_only = true + + create_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workstation_cluster, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["workstation_cluster_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::WorkstationCluster), request["workstation_cluster"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workstation_cluster parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workstation_cluster ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workstation_cluster(::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, 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_workstation_cluster_client_stub.call_rpc_count + end + end + + def test_update_workstation_cluster + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workstation_cluster = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workstation_cluster, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::WorkstationCluster), request["workstation_cluster"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, 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 + client.update_workstation_cluster workstation_cluster: workstation_cluster, update_mask: update_mask, 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 + client.update_workstation_cluster ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, 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 + client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, 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 + client.update_workstation_cluster(::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, 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_workstation_cluster_client_stub.call_rpc_count + end + end + + def test_delete_workstation_cluster + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workstation_cluster, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workstation_cluster_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workstation_cluster name: name, validate_only: validate_only, etag: etag, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workstation_cluster ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workstation_cluster(::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, 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_workstation_cluster_client_stub.call_rpc_count + end + end + + def test_get_workstation_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1beta::WorkstationConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workstation_config, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workstation_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workstation_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workstation_config ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workstation_config({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workstation_config(::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workstation_config_client_stub.call_rpc_count + end + end + + def test_list_workstation_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstation_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workstation_configs, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest, 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_workstation_configs_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.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_workstation_configs_client_stub.call_rpc_count + end + end + + def test_list_usable_workstation_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_usable_workstation_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_usable_workstation_configs, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest, 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_usable_workstation_configs_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_usable_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_usable_workstation_configs ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_usable_workstation_configs(::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.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_usable_workstation_configs_client_stub.call_rpc_count + end + end + + def test_create_workstation_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workstation_config_id = "hello world" + workstation_config = {} + validate_only = true + + create_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workstation_config, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["workstation_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::WorkstationConfig), request["workstation_config"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workstation_config parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workstation_config ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workstation_config(::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_workstation_config_client_stub.call_rpc_count + end + end + + def test_update_workstation_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workstation_config = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workstation_config, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::WorkstationConfig), request["workstation_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, 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 + client.update_workstation_config workstation_config: workstation_config, update_mask: update_mask, 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 + client.update_workstation_config ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, 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 + client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, 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 + client.update_workstation_config(::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, 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_workstation_config_client_stub.call_rpc_count + end + end + + def test_delete_workstation_config + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + force = true + + delete_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workstation_config, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workstation_config_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workstation_config name: name, validate_only: validate_only, etag: etag, force: force do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workstation_config ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workstation_config(::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, 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_workstation_config_client_stub.call_rpc_count + end + end + + def test_get_workstation + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1beta::Workstation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_workstation({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_workstation name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_workstation ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_workstation({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_workstation(::Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new(name: name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_workstation_client_stub.call_rpc_count + end + end + + def test_list_workstations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_workstations, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest, 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_workstations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_workstations parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.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_workstations_client_stub.call_rpc_count + end + end + + def test_list_usable_workstations + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_usable_workstations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_usable_workstations, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest, 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_usable_workstations_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_usable_workstations parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_usable_workstations ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_usable_workstations(::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.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_usable_workstations_client_stub.call_rpc_count + end + end + + def test_create_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + workstation_id = "hello world" + workstation = {} + validate_only = true + + create_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["workstation_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::Workstation), request["workstation"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_workstation parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_workstation ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_workstation(::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, 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_workstation_client_stub.call_rpc_count + end + end + + def test_update_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + workstation = {} + update_mask = {} + validate_only = true + allow_missing = true + + update_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::Workstation), request["workstation"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["validate_only"] + assert_equal true, request["allow_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_workstation({ workstation: workstation, update_mask: update_mask, 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 + client.update_workstation workstation: workstation, update_mask: update_mask, 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 + client.update_workstation ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, 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 + client.update_workstation({ workstation: workstation, update_mask: update_mask, 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 + client.update_workstation(::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, 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_workstation_client_stub.call_rpc_count + end + end + + def test_delete_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + + delete_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_workstation ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_workstation(::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_workstation_client_stub.call_rpc_count + end + end + + def test_start_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + + start_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :start_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, start_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.start_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.start_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.start_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, start_workstation_client_stub.call_rpc_count + end + end + + def test_stop_workstation + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + etag = "hello world" + + stop_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :stop_workstation, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, stop_workstation_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.stop_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.stop_workstation ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.stop_workstation(::Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, stop_workstation_client_stub.call_rpc_count + end + end + + def test_generate_access_token + # Create GRPC objects. + grpc_response = ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + expire_time = {} + workstation = "hello world" + + generate_access_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_access_token, name + assert_kind_of ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["expire_time"] + assert_equal :expire_time, request.expiration + assert_equal "hello world", request["workstation"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_access_token_client_stub do + # Create client + client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_access_token({ expire_time: expire_time, workstation: workstation }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_access_token expire_time: expire_time, workstation: workstation do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_access_token({ expire_time: expire_time, workstation: workstation }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_access_token_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::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Workstations::V1beta::Workstations::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations/.gitignore b/owl-bot-staging/google-cloud-workstations/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-cloud-workstations/.repo-metadata.json b/owl-bot-staging/google-cloud-workstations/.repo-metadata.json new file mode 100644 index 000000000000..0ad86f171f24 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "workstations.googleapis.com", + "api_shortname": "workstations", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workstations/latest", + "distribution_name": "google-cloud-workstations", + "is_cloud": true, + "language": "ruby", + "name": "workstations", + "name_pretty": "Cloud Workstations API", + "product_documentation": "https://cloud.google.com/workstations/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Allows administrators to create managed developer environments in the cloud.", + "ruby-cloud-product-url": "https://cloud.google.com/workstations/docs", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-workstations/.rubocop.yml b/owl-bot-staging/google-cloud-workstations/.rubocop.yml new file mode 100644 index 000000000000..c3bfad84aa94 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-workstations.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-cloud-workstations.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-workstations/.toys.rb b/owl-bot-staging/google-cloud-workstations/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/.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-workstations/.yardopts b/owl-bot-staging/google-cloud-workstations/.yardopts new file mode 100644 index 000000000000..e7047879b6ba --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Cloud Workstations API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-workstations/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workstations/AUTHENTICATION.md new file mode 100644 index 000000000000..7824cf9abd38 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-workstations 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-workstations 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/workstations" + +client = Google::Cloud::Workstations.workstations do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/workstations" + +Google::Cloud::Workstations.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Workstations.workstations +``` + +### 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-workstations +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/workstations" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Workstations.workstations +``` + +### 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-workstations/CHANGELOG.md b/owl-bot-staging/google-cloud-workstations/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-workstations/Gemfile b/owl-bot-staging/google-cloud-workstations/Gemfile new file mode 100644 index 000000000000..5bd361887bb8 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-workstations-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-workstations.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workstations/LICENSE.md b/owl-bot-staging/google-cloud-workstations/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/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-workstations/README.md b/owl-bot-staging/google-cloud-workstations/README.md new file mode 100644 index 000000000000..beab088388aa --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/README.md @@ -0,0 +1,141 @@ +# Ruby Client for the Cloud Workstations API + +Allows administrators to create managed developer environments in the cloud. + + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-workstations-v*`. +The gem `google-cloud-workstations` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations/latest) +for this library, google-cloud-workstations, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-workstations-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/workstations/docs) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-workstations +``` + +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/workstations.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/workstations" + +client = Google::Cloud::Workstations.workstations +request = ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new # (request fields as keyword arguments...) +response = client.get_workstation_cluster request +``` + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-workstations-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-cloud-workstations`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-workstations-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-workstations`. +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-workstations-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-workstations/Rakefile b/owl-bot-staging/google-cloud-workstations/Rakefile new file mode 100644 index 000000000000..80aff46a2109 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-cloud-workstations 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/workstations/v1/workstations/credentials" + ::Google::Cloud::Workstations::V1::Workstations::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-workstations 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-workstations 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-workstations 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-workstations gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-workstations" + header "google-cloud-workstations rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-workstations yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-workstations 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-workstations 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-workstations 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-workstations/google-cloud-workstations.gemspec b/owl-bot-staging/google-cloud-workstations/google-cloud-workstations.gemspec new file mode 100644 index 000000000000..a67c69cf4219 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/google-cloud-workstations.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/workstations/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-workstations" + gem.version = Google::Cloud::Workstations::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Allows administrators to create managed developer environments in the cloud." + gem.summary = "Allows administrators to create managed developer environments in the cloud." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-workstations-v1", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-workstations/lib/google-cloud-workstations.rb b/owl-bot-staging/google-cloud-workstations/lib/google-cloud-workstations.rb new file mode 100644 index 000000000000..921e8bf1c4ec --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/lib/google-cloud-workstations.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/cloud/workstations" unless defined? Google::Cloud::Workstations::VERSION diff --git a/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations.rb b/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations.rb new file mode 100644 index 000000000000..30a02cf8001a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/workstations/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :workstations do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Workstations + ## + # Create a new client object for Workstations. + # + # By default, this returns an instance of + # [Google::Cloud::Workstations::V1::Workstations::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest/Google-Cloud-Workstations-V1-Workstations-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Workstations service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Workstations service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Workstations.workstations_available?}. + # + # ## About Workstations + # + # Service for interacting with Cloud Workstations. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.workstations version: :v1, transport: :grpc, &block + require "google/cloud/workstations/#{version.to_s.downcase}" + + package_name = Google::Cloud::Workstations + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Workstations.const_get(package_name).const_get(:Workstations) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Workstations service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Workstations.workstations}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Workstations service, + # or if the versioned client gem needs an update to support the Workstations service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.workstations_available? version: :v1, transport: :grpc + require "google/cloud/workstations/#{version.to_s.downcase}" + package_name = Google::Cloud::Workstations + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Workstations.const_get package_name + return false unless service_module.const_defined? :Workstations + service_module = service_module.const_get :Workstations + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-workstations library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - + # The error codes that should trigger a retry. + # + # @return [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.workstations if block_given? + + ::Google::Cloud.configure.workstations + end + end + end +end + +helper_path = ::File.join __dir__, "workstations", "helpers.rb" +require "google/cloud/workstations/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations/version.rb b/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations/version.rb new file mode 100644 index 000000000000..f1ab37b3c792 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Cloud + module Workstations + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/client_test.rb b/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/client_test.rb new file mode 100644 index 000000000000..aa658d02b0ca --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/workstations" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Workstations::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_workstations_grpc + skip unless Google::Cloud::Workstations.workstations_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Workstations.workstations transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Workstations::V1::Workstations::Client, client + end + end + + def test_workstations_rest + skip unless Google::Cloud::Workstations.workstations_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Workstations.workstations transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Workstations::V1::Workstations::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/version_test.rb b/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/version_test.rb new file mode 100644 index 000000000000..578aca1a3e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/cloud/workstations/version" + +class Google::Cloud::Workstations::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Workstations::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-workstations/test/helper.rb b/owl-bot-staging/google-cloud-workstations/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-workstations/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-iam-client/.gitignore b/owl-bot-staging/google-iam-client/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-iam-client/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-iam-client/.repo-metadata.json b/owl-bot-staging/google-iam-client/.repo-metadata.json new file mode 100644 index 000000000000..6bb4001d9b94 --- /dev/null +++ b/owl-bot-staging/google-iam-client/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "iam.googleapis.com", + "api_shortname": "iam", + "client_documentation": "https://rubydoc.info/gems/google-iam", + "distribution_name": "google-iam", + "is_cloud": false, + "language": "ruby", + "name": "iam", + "name_pretty": "IAM API", + "product_documentation": "https://cloud.google.com/iam", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Manages identity and access control policies for Google Cloud Platform resources.", + "ruby-cloud-product-url": "https://cloud.google.com/iam", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-iam-client/.rubocop.yml b/owl-bot-staging/google-iam-client/.rubocop.yml new file mode 100644 index 000000000000..3d2e7957592c --- /dev/null +++ b/owl-bot-staging/google-iam-client/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-iam.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-iam.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-iam-client/.toys.rb b/owl-bot-staging/google-iam-client/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-iam-client/.toys.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +toys_version! ">= 0.15.3" + +if ENV["RUBY_COMMON_TOOLS"] + common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] + load File.join(common_tools_dir, "toys", "gapic") +else + load_git remote: "https://github.com/googleapis/ruby-common-tools.git", + path: "toys/gapic", + update: true +end diff --git a/owl-bot-staging/google-iam-client/.yardopts b/owl-bot-staging/google-iam-client/.yardopts new file mode 100644 index 000000000000..361931405491 --- /dev/null +++ b/owl-bot-staging/google-iam-client/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="IAM API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-iam-client/AUTHENTICATION.md b/owl-bot-staging/google-iam-client/AUTHENTICATION.md new file mode 100644 index 000000000000..49f1aadc0f0f --- /dev/null +++ b/owl-bot-staging/google-iam-client/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-iam 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-iam 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/iam" + +client = Google::Iam.policies do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/iam" + +Google::Iam.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Iam.policies +``` + +### 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-iam +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/iam" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Iam.policies +``` + +### 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-iam-client/CHANGELOG.md b/owl-bot-staging/google-iam-client/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-iam-client/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-iam-client/Gemfile b/owl-bot-staging/google-iam-client/Gemfile new file mode 100644 index 000000000000..18bab2b116b8 --- /dev/null +++ b/owl-bot-staging/google-iam-client/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-iam-v2"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-iam.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-client/LICENSE.md b/owl-bot-staging/google-iam-client/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-iam-client/LICENSE.md @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/owl-bot-staging/google-iam-client/README.md b/owl-bot-staging/google-iam-client/README.md new file mode 100644 index 000000000000..4a054c8777f2 --- /dev/null +++ b/owl-bot-staging/google-iam-client/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the IAM API + +API Client library for the IAM API + +Manages identity and access control policies for Google Cloud Platform resources. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-iam-v*`. +The gem `google-iam` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://rubydoc.info/gems/google-iam) +for this library, google-iam, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-iam-v2](https://rubydoc.info/gems/google-iam-v2). + +See also the [Product Documentation](https://cloud.google.com/iam) +for more usage information. + +## Quick Start + +``` +$ gem install google-iam +``` + +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/iam.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/iam" + +client = Google::Iam.policies +request = ::Google::Iam::V2::ListPoliciesRequest.new # (request fields as keyword arguments...) +response = client.list_policies request +``` + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-iam-v2](https://rubydoc.info/gems/google-iam-v2). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-iam`, +and lower-level _versioned_ client libraries with names such as +`google-iam-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-iam`. +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-iam-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-iam-client/Rakefile b/owl-bot-staging/google-iam-client/Rakefile new file mode 100644 index 000000000000..a66f7608355d --- /dev/null +++ b/owl-bot-staging/google-iam-client/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-iam 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/iam/v2/policies/credentials" + ::Google::Iam::V2::Policies::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-iam 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-iam 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-iam 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-iam gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-iam" + header "google-iam rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-iam yard", "*" + Rake::Task[:yard].invoke + header "google-iam 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-iam 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-iam 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-iam-client/google-iam.gemspec b/owl-bot-staging/google-iam-client/google-iam.gemspec new file mode 100644 index 000000000000..9f1991066a69 --- /dev/null +++ b/owl-bot-staging/google-iam-client/google-iam.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/iam/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-iam" + gem.version = Google::Iam::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Manages identity and access control policies for Google Cloud Platform resources." + gem.summary = "API Client library for the IAM API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-iam-v2", ">= 0.5", "< 2.a" +end diff --git a/owl-bot-staging/google-iam-client/lib/google-iam.rb b/owl-bot-staging/google-iam-client/lib/google-iam.rb new file mode 100644 index 000000000000..0b97b3e39bb9 --- /dev/null +++ b/owl-bot-staging/google-iam-client/lib/google-iam.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam" unless defined? Google::Iam::VERSION diff --git a/owl-bot-staging/google-iam-client/lib/google/iam.rb b/owl-bot-staging/google-iam-client/lib/google/iam.rb new file mode 100644 index 000000000000..651ba582ef1c --- /dev/null +++ b/owl-bot-staging/google-iam-client/lib/google/iam.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! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/iam/version" + +require "googleauth" + +module Google + module Iam + ## + # Create a new client object for Policies. + # + # By default, this returns an instance of + # [Google::Iam::V2::Policies::Client](https://rubydoc.info/gems/google-iam-v2/Google/Iam/V2/Policies/Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Policies service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Policies service. + # You can determine whether the method will succeed by calling + # {Google::Iam.policies_available?}. + # + # ## About Policies + # + # An interface for managing Identity and Access Management (IAM) policies. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.policies version: :v2, transport: :grpc, &block + require "google/iam/#{version.to_s.downcase}" + + package_name = Google::Iam + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Iam.const_get(package_name).const_get(:Policies) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Policies service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Iam.policies}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Policies service, + # or if the versioned client gem needs an update to support the Policies service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.policies_available? version: :v2, transport: :grpc + require "google/iam/#{version.to_s.downcase}" + package_name = Google::Iam + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Iam.const_get package_name + return false unless service_module.const_defined? :Policies + service_module = service_module.const_get :Policies + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + end +end + +helper_path = ::File.join __dir__, "iam", "helpers.rb" +require "google/iam/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-client/lib/google/iam/version.rb b/owl-bot-staging/google-iam-client/lib/google/iam/version.rb new file mode 100644 index 000000000000..e33ffca99bef --- /dev/null +++ b/owl-bot-staging/google-iam-client/lib/google/iam/version.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the 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 + VERSION = "0.0.1" + end +end diff --git a/owl-bot-staging/google-iam-client/test/google/iam/client_test.rb b/owl-bot-staging/google-iam-client/test/google/iam/client_test.rb new file mode 100644 index 000000000000..3bae2afd204c --- /dev/null +++ b/owl-bot-staging/google-iam-client/test/google/iam/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/iam" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Iam::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_policies_grpc + skip unless Google::Iam.policies_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Iam.policies transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Iam::V2::Policies::Client, client + end + end + + def test_policies_rest + skip unless Google::Iam.policies_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Iam.policies transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Iam::V2::Policies::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-iam-client/test/google/iam/version_test.rb b/owl-bot-staging/google-iam-client/test/google/iam/version_test.rb new file mode 100644 index 000000000000..0e1097a200d4 --- /dev/null +++ b/owl-bot-staging/google-iam-client/test/google/iam/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/iam/version" + +class Google::Iam::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Iam::VERSION + end +end diff --git a/owl-bot-staging/google-iam-client/test/helper.rb b/owl-bot-staging/google-iam-client/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-iam-client/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-iam-credentials-v1/.gitignore b/owl-bot-staging/google-iam-credentials-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-iam-credentials-v1/.repo-metadata.json b/owl-bot-staging/google-iam-credentials-v1/.repo-metadata.json new file mode 100644 index 000000000000..63df137774ef --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "iamcredentials.googleapis.com", + "api_shortname": "iamcredentials", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest", + "distribution_name": "google-iam-credentials-v1", + "is_cloud": true, + "language": "ruby", + "name": "iamcredentials", + "name_pretty": "IAM Service Account Credentials V1 API", + "product_documentation": "https://cloud.google.com/iam", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens. Note that google-iam-credentials-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-credentials instead. See the readme for more details.", + "ruby-cloud-env-prefix": "IAM_CREDENTIALS", + "ruby-cloud-product-url": "https://cloud.google.com/iam", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-iam-credentials-v1/.rubocop.yml b/owl-bot-staging/google-iam-credentials-v1/.rubocop.yml new file mode 100644 index 000000000000..9b2a231aba17 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-iam-credentials-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-iam-credentials-v1.rb" diff --git a/owl-bot-staging/google-iam-credentials-v1/.toys.rb b/owl-bot-staging/google-iam-credentials-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/.yardopts b/owl-bot-staging/google-iam-credentials-v1/.yardopts new file mode 100644 index 000000000000..b52365dc43b4 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="IAM Service Account Credentials 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-iam-credentials-v1/AUTHENTICATION.md b/owl-bot-staging/google-iam-credentials-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..1d811fed1a80 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-iam-credentials-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-iam-credentials-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/iam/credentials/v1" + +client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/iam/credentials/v1" + +::Google::Iam::Credentials::V1::IAMCredentials::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Iam::Credentials::V1::IAMCredentials::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-iam-credentials-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/iam/credentials/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Iam::Credentials::V1::IAMCredentials::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-iam-credentials-v1/CHANGELOG.md b/owl-bot-staging/google-iam-credentials-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-iam-credentials-v1/Gemfile b/owl-bot-staging/google-iam-credentials-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-credentials-v1/LICENSE.md b/owl-bot-staging/google-iam-credentials-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/README.md b/owl-bot-staging/google-iam-credentials-v1/README.md new file mode 100644 index 000000000000..6e9c7e5f994f --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the IAM Service Account Credentials V1 API + +Creates short-lived, limited-privilege credentials for IAM service accounts. + +The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the IAM Service Account Credentials V1 API. Most users should consider using +the main client gem, +[google-iam-credentials](https://rubygems.org/gems/google-iam-credentials). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-iam-credentials-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/iamcredentials.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/iam/credentials/v1" + +client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new +request = ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new # (request fields as keyword arguments...) +response = client.generate_access_token request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/iam) +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/iam/credentials/v1" +require "logger" + +client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.logger = Logger.new "my-app.log" +end +``` + +## Google Cloud Samples + +To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-iam-credentials`, +and lower-level _versioned_ client libraries with names such as +`google-iam-credentials-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-iam-credentials`. +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-iam-credentials-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-iam-credentials-v1/Rakefile b/owl-bot-staging/google-iam-credentials-v1/Rakefile new file mode 100644 index 000000000000..d9311daefed7 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["IAM_CREDENTIALS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["IAM_CREDENTIALS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["IAM_CREDENTIALS_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 IAM_CREDENTIALS_TEST_PROJECT=test123 IAM_CREDENTIALS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/iam/credentials/v1/iam_credentials/credentials" + ::Google::Iam::Credentials::V1::IAMCredentials::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["IAM_CREDENTIALS_PROJECT"] = project + ENV["IAM_CREDENTIALS_TEST_PROJECT"] = project + ENV["IAM_CREDENTIALS_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-iam-credentials-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-iam-credentials-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-iam-credentials-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-iam-credentials-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-iam-credentials-v1" + header "google-iam-credentials-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-iam-credentials-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-iam-credentials-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-iam-credentials-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-iam-credentials-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-iam-credentials-v1/gapic_metadata.json b/owl-bot-staging/google-iam-credentials-v1/gapic_metadata.json new file mode 100644 index 000000000000..e3528a0323fe --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-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.iam.credentials.v1", + "libraryPackage": "::Google::Iam::Credentials::V1", + "services": { + "IAMCredentials": { + "clients": { + "grpc": { + "libraryClient": "::Google::Iam::Credentials::V1::IAMCredentials::Client", + "rpcs": { + "GenerateAccessToken": { + "methods": [ + "generate_access_token" + ] + }, + "GenerateIdToken": { + "methods": [ + "generate_id_token" + ] + }, + "SignBlob": { + "methods": [ + "sign_blob" + ] + }, + "SignJwt": { + "methods": [ + "sign_jwt" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-iam-credentials-v1/google-iam-credentials-v1.gemspec b/owl-bot-staging/google-iam-credentials-v1/google-iam-credentials-v1.gemspec new file mode 100644 index 000000000000..8710a11ce560 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/google-iam-credentials-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/iam/credentials/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-iam-credentials-v1" + gem.version = Google::Iam::Credentials::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens. Note that google-iam-credentials-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-credentials instead. See the readme for more details." + gem.summary = "Creates short-lived, limited-privilege credentials for IAM service accounts." + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + `git ls-files -- proto_docs/*`.split("\n") + + ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb new file mode 100644 index 000000000000..ed2f7cb1dc33 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google-iam-credentials-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/iam/credentials/v1" diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb new file mode 100644 index 000000000000..a614ad91054b --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/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/iam/credentials/v1/iam_credentials" +require "google/iam/credentials/v1/version" + +module Google + module Iam + module Credentials + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/iam/credentials/v1" + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/iam/credentials/v1" + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/iam/credentials/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb new file mode 100644 index 000000000000..54447155b556 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/credentials/v1/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/iam/credentials/v1/common.proto\x12\x19google.iam.credentials.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa9\x01\n\x1aGenerateAccessTokenRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x02 \x03(\t\x12\x12\n\x05scope\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12+\n\x08lifetime\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\"d\n\x1bGenerateAccessTokenResponse\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"s\n\x0fSignBlobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x03 \x03(\t\x12\x14\n\x07payload\x18\x05 \x01(\x0c\x42\x03\xe0\x41\x02\"7\n\x10SignBlobResponse\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x13\n\x0bsigned_blob\x18\x04 \x01(\x0c\"r\n\x0eSignJwtRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x03 \x03(\t\x12\x14\n\x07payload\x18\x05 \x01(\tB\x03\xe0\x41\x02\"5\n\x0fSignJwtResponse\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x12\n\nsigned_jwt\x18\x02 \x01(\t\"\x92\x01\n\x16GenerateIdTokenRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x02 \x03(\t\x12\x15\n\x08\x61udience\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rinclude_email\x18\x04 \x01(\x08\"(\n\x17GenerateIdTokenResponse\x12\r\n\x05token\x18\x01 \x01(\tB\xac\x02\n#com.google.cloud.iam.credentials.v1B\x19IAMCredentialsCommonProtoP\x01ZEcloud.google.com/go/iam/credentials/apiv1/credentialspb;credentialspb\xf8\x01\x01\xaa\x02\x1fGoogle.Cloud.Iam.Credentials.V1\xca\x02\x1fGoogle\\Cloud\\Iam\\Credentials\\V1\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Iam + module Credentials + module V1 + GenerateAccessTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.GenerateAccessTokenRequest").msgclass + GenerateAccessTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.GenerateAccessTokenResponse").msgclass + SignBlobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.SignBlobRequest").msgclass + SignBlobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.SignBlobResponse").msgclass + SignJwtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.SignJwtRequest").msgclass + SignJwtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.SignJwtResponse").msgclass + GenerateIdTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.GenerateIdTokenRequest").msgclass + GenerateIdTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.GenerateIdTokenResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb new file mode 100644 index 000000000000..f97cbb3723e3 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.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/iam/credentials/v1/version" + +require "google/iam/credentials/v1/iam_credentials/credentials" +require "google/iam/credentials/v1/iam_credentials/paths" +require "google/iam/credentials/v1/iam_credentials/client" +require "google/iam/credentials/v1/iam_credentials/rest" + +module Google + module Iam + module Credentials + module V1 + ## + # A service account is a special type of Google account that belongs to your + # application or a virtual machine (VM), instead of to an individual end user. + # Your application assumes the identity of the service account to call Google + # APIs, so that the users aren't directly involved. + # + # Service account credentials are used to temporarily assume the identity + # of the service account. Supported credential types include OAuth 2.0 access + # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and + # more. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/iam/credentials/v1/iam_credentials" + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/iam/credentials/v1/iam_credentials/rest" + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new + # + module IAMCredentials + end + end + end + end +end + +helper_path = ::File.join __dir__, "iam_credentials", "helpers.rb" +require "google/iam/credentials/v1/iam_credentials/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb new file mode 100644 index 000000000000..b1369925485c --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb @@ -0,0 +1,854 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/credentials/v1/iamcredentials_pb" + +module Google + module Iam + module Credentials + module V1 + module IAMCredentials + ## + # Client for the IAMCredentials service. + # + # A service account is a special type of Google account that belongs to your + # application or a virtual machine (VM), instead of to an individual end user. + # Your application assumes the identity of the service account to call Google + # APIs, so that the users aren't directly involved. + # + # Service account credentials are used to temporarily assume the identity + # of the service account. Supported credential types include OAuth 2.0 access + # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and + # more. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iamcredentials.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :iam_credentials_stub + + ## + # Configure the IAMCredentials Client class. + # + # See {::Google::Iam::Credentials::V1::IAMCredentials::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IAMCredentials clients + # ::Google::Iam::Credentials::V1::IAMCredentials::Client.configure do |config| + # config.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", "Credentials", "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.generate_access_token.timeout = 60.0 + default_config.rpcs.generate_access_token.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.generate_id_token.timeout = 60.0 + default_config.rpcs.generate_id_token.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.sign_blob.timeout = 60.0 + default_config.rpcs.sign_blob.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.sign_jwt.timeout = 60.0 + default_config.rpcs.sign_jwt.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 IAMCredentials Client instance. + # + # The configuration is set to the derived mode, meaning that 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::Credentials::V1::IAMCredentials::Client::Configuration} + # for a description of the configuration fields. + # + # @yield [config] Configure the Client client. + # @yieldparam 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_credentials_stub.universe_domain + end + + ## + # Create a new IAMCredentials client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IAMCredentials 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/credentials/v1/iamcredentials_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_credentials_stub = ::Gapic::ServiceStub.new( + ::Google::Iam::Credentials::V1::IAMCredentials::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_credentials_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 + @iam_credentials_stub.logger + end + + # Service calls + + ## + # Generates an OAuth 2.0 access token for a service account. + # + # @overload generate_access_token(request, options = nil) + # Pass arguments to `generate_access_token` via a request object, either of type + # {::Google::Iam::Credentials::V1::GenerateAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::Credentials::V1::GenerateAccessTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_token(name: nil, delegates: nil, scope: nil, lifetime: nil) + # Pass arguments to `generate_access_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param delegates [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param scope [::Array<::String>] + # Required. Code to identify the scopes to be included in the OAuth 2.0 access token. + # See https://developers.google.com/identity/protocols/googlescopes for more + # information. + # At least one value required. + # @param lifetime [::Google::Protobuf::Duration, ::Hash] + # The desired lifetime duration of the access token in seconds. + # Must be set to a value less than or equal to 3600 (1 hour). If a value is + # not specified, the token's lifetime will be set to a default value of one + # hour. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/credentials/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::Credentials::V1::IAMCredentials::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new + # + # # Call the generate_access_token method. + # result = client.generate_access_token request + # + # # The returned object is of type Google::Iam::Credentials::V1::GenerateAccessTokenResponse. + # p result + # + def generate_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest + + # Converts hash and nil to 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_access_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::Credentials::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_access_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_credentials_stub.call_rpc :generate_access_token, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Generates an OpenID Connect ID token for a service account. + # + # @overload generate_id_token(request, options = nil) + # Pass arguments to `generate_id_token` via a request object, either of type + # {::Google::Iam::Credentials::V1::GenerateIdTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::Credentials::V1::GenerateIdTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_id_token(name: nil, delegates: nil, audience: nil, include_email: nil) + # Pass arguments to `generate_id_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param delegates [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param audience [::String] + # Required. The audience for the token, such as the API or account that this token + # grants access to. + # @param include_email [::Boolean] + # Include the service account email in the token. If set to `true`, the + # token will contain `email` and `email_verified` claims. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/credentials/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::Credentials::V1::IAMCredentials::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::Credentials::V1::GenerateIdTokenRequest.new + # + # # Call the generate_id_token method. + # result = client.generate_id_token request + # + # # The returned object is of type Google::Iam::Credentials::V1::GenerateIdTokenResponse. + # p result + # + def generate_id_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::GenerateIdTokenRequest + + # Converts hash and nil to 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_id_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::Credentials::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_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_id_token.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_id_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_credentials_stub.call_rpc :generate_id_token, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Signs a blob using a service account's system-managed private key. + # + # @overload sign_blob(request, options = nil) + # Pass arguments to `sign_blob` via a request object, either of type + # {::Google::Iam::Credentials::V1::SignBlobRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::Credentials::V1::SignBlobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload sign_blob(name: nil, delegates: nil, payload: nil) + # Pass arguments to `sign_blob` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param delegates [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param payload [::String] + # Required. The bytes to sign. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::Credentials::V1::SignBlobResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::Credentials::V1::SignBlobResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/credentials/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::Credentials::V1::IAMCredentials::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::Credentials::V1::SignBlobRequest.new + # + # # Call the sign_blob method. + # result = client.sign_blob request + # + # # The returned object is of type Google::Iam::Credentials::V1::SignBlobResponse. + # p result + # + def sign_blob request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::SignBlobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.sign_blob.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::Credentials::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.sign_blob.timeout, + metadata: metadata, + retry_policy: @config.rpcs.sign_blob.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_credentials_stub.call_rpc :sign_blob, request, options: options do |response, operation| + yield response, operation if block_given? + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Signs a JWT using a service account's system-managed private key. + # + # @overload sign_jwt(request, options = nil) + # Pass arguments to `sign_jwt` via a request object, either of type + # {::Google::Iam::Credentials::V1::SignJwtRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::Credentials::V1::SignJwtRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload sign_jwt(name: nil, delegates: nil, payload: nil) + # Pass arguments to `sign_jwt` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or 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 service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param delegates [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param payload [::String] + # Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Iam::Credentials::V1::SignJwtResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Iam::Credentials::V1::SignJwtResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/iam/credentials/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::Credentials::V1::IAMCredentials::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::Credentials::V1::SignJwtRequest.new + # + # # Call the sign_jwt method. + # result = client.sign_jwt request + # + # # The returned object is of type Google::Iam::Credentials::V1::SignJwtResponse. + # p result + # + def sign_jwt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::SignJwtRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.sign_jwt.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::Credentials::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.name + header_params["name"] = request.name + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.sign_jwt.timeout, + metadata: metadata, + retry_policy: @config.rpcs.sign_jwt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_credentials_stub.call_rpc :sign_jwt, request, 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 IAMCredentials API. + # + # This class represents the configuration for IAMCredentials, + # providing control 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::Credentials::V1::IAMCredentials::Client::Configuration::Rpcs} + # for a list of RPCs that can be configured independently. + # + # Configuration can be applied globally to all clients, or to a single client + # on construction. + # + # @example + # + # # Modify the global config, setting the timeout for + # # generate_access_token to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::Credentials::V1::IAMCredentials::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_access_token.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_access_token.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint 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::Credentials::V1::IAMCredentials::Client.new do |config| + # config.credentials = credentials + # end + # + # @note Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] channel_args + # Extra parameters passed to the gRPC channel. Note: this is ignored if a + # `GRPC::Core::Channel` object is provided as the credential. + # @return [::Hash] + # @!attribute [rw] interceptors + # An array of interceptors that are run before calls are executed. + # @return [::Array<::GRPC::ClientInterceptor>] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional gRPC headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iamcredentials.googleapis.com" + + config_attr :endpoint, nil, ::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 IAMCredentials API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_access_token + ## + # RPC-specific configuration for `generate_id_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_id_token + ## + # RPC-specific configuration for `sign_blob` + # @return [::Gapic::Config::Method] + # + attr_reader :sign_blob + ## + # RPC-specific configuration for `sign_jwt` + # @return [::Gapic::Config::Method] + # + attr_reader :sign_jwt + + # @private + def initialize parent_rpcs = nil + generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token + @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config + generate_id_token_config = parent_rpcs.generate_id_token if parent_rpcs.respond_to? :generate_id_token + @generate_id_token = ::Gapic::Config::Method.new generate_id_token_config + sign_blob_config = parent_rpcs.sign_blob if parent_rpcs.respond_to? :sign_blob + @sign_blob = ::Gapic::Config::Method.new sign_blob_config + sign_jwt_config = parent_rpcs.sign_jwt if parent_rpcs.respond_to? :sign_jwt + @sign_jwt = ::Gapic::Config::Method.new sign_jwt_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb new file mode 100644 index 000000000000..7cb79642525d --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/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 Iam + module Credentials + module V1 + module IAMCredentials + # Credentials for the IAMCredentials API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "IAM_CREDENTIALS_CREDENTIALS", + "IAM_CREDENTIALS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "IAM_CREDENTIALS_CREDENTIALS_JSON", + "IAM_CREDENTIALS_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-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb new file mode 100644 index 000000000000..a57ff6ec11e5 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/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 Iam + module Credentials + module V1 + module IAMCredentials + # Path helper methods for the IAMCredentials API. + module Paths + ## + # Create a fully-qualified ServiceAccount resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/serviceAccounts/{service_account}` + # + # @param project [String] + # @param service_account [String] + # + # @return [::String] + def service_account_path project:, service_account: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/serviceAccounts/#{service_account}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb new file mode 100644 index 000000000000..80ffb5c62a94 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/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/iam/credentials/v1/version" + +require "google/iam/credentials/v1/iam_credentials/credentials" +require "google/iam/credentials/v1/iam_credentials/paths" +require "google/iam/credentials/v1/iam_credentials/rest/client" + +module Google + module Iam + module Credentials + module V1 + ## + # A service account is a special type of Google account that belongs to your + # application or a virtual machine (VM), instead of to an individual end user. + # Your application assumes the identity of the service account to call Google + # APIs, so that the users aren't directly involved. + # + # Service account credentials are used to temporarily assume the identity + # of the service account. Supported credential types include OAuth 2.0 access + # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and + # more. + # + # To load this service and instantiate a REST client: + # + # require "google/iam/credentials/v1/iam_credentials/rest" + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new + # + module IAMCredentials + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/iam/credentials/v1/iam_credentials/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb new file mode 100644 index 000000000000..9771a2dee4a6 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb @@ -0,0 +1,783 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the 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/credentials/v1/iamcredentials_pb" +require "google/iam/credentials/v1/iam_credentials/rest/service_stub" + +module Google + module Iam + module Credentials + module V1 + module IAMCredentials + module Rest + ## + # REST client for the IAMCredentials service. + # + # A service account is a special type of Google account that belongs to your + # application or a virtual machine (VM), instead of to an individual end user. + # Your application assumes the identity of the service account to call Google + # APIs, so that the users aren't directly involved. + # + # Service account credentials are used to temporarily assume the identity + # of the service account. Supported credential types include OAuth 2.0 access + # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and + # more. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "iamcredentials.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :iam_credentials_stub + + ## + # Configure the IAMCredentials Client class. + # + # See {::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all IAMCredentials clients + # ::Google::Iam::Credentials::V1::IAMCredentials::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", "Credentials", "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.generate_access_token.timeout = 60.0 + default_config.rpcs.generate_access_token.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.generate_id_token.timeout = 60.0 + default_config.rpcs.generate_id_token.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.sign_blob.timeout = 60.0 + default_config.rpcs.sign_blob.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.sign_jwt.timeout = 60.0 + default_config.rpcs.sign_jwt.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 IAMCredentials Client instance. + # + # The configuration is set to the derived mode, meaning that 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::Credentials::V1::IAMCredentials::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_credentials_stub.universe_domain + end + + ## + # Create a new IAMCredentials REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the IAMCredentials 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_credentials_stub = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @iam_credentials_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 + @iam_credentials_stub.logger + end + + # Service calls + + ## + # Generates an OAuth 2.0 access token for a service account. + # + # @overload generate_access_token(request, options = nil) + # Pass arguments to `generate_access_token` via a request object, either of type + # {::Google::Iam::Credentials::V1::GenerateAccessTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::Credentials::V1::GenerateAccessTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_access_token(name: nil, delegates: nil, scope: nil, lifetime: nil) + # Pass arguments to `generate_access_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param delegates [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param scope [::Array<::String>] + # Required. Code to identify the scopes to be included in the OAuth 2.0 access token. + # See https://developers.google.com/identity/protocols/googlescopes for more + # information. + # At least one value required. + # @param lifetime [::Google::Protobuf::Duration, ::Hash] + # The desired lifetime duration of the access token in seconds. + # Must be set to a value less than or equal to 3600 (1 hour). If a value is + # not specified, the token's lifetime will be set to a default value of one + # hour. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/credentials/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new + # + # # Call the generate_access_token method. + # result = client.generate_access_token request + # + # # The returned object is of type Google::Iam::Credentials::V1::GenerateAccessTokenResponse. + # p result + # + def generate_access_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest + + # Converts hash and nil to an 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_access_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::Credentials::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_access_token.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_access_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_credentials_stub.generate_access_token request, 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 an OpenID Connect ID token for a service account. + # + # @overload generate_id_token(request, options = nil) + # Pass arguments to `generate_id_token` via a request object, either of type + # {::Google::Iam::Credentials::V1::GenerateIdTokenRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::Credentials::V1::GenerateIdTokenRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_id_token(name: nil, delegates: nil, audience: nil, include_email: nil) + # Pass arguments to `generate_id_token` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param delegates [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param audience [::String] + # Required. The audience for the token, such as the API or account that this token + # grants access to. + # @param include_email [::Boolean] + # Include the service account email in the token. If set to `true`, the + # token will contain `email` and `email_verified` claims. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/credentials/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::Credentials::V1::GenerateIdTokenRequest.new + # + # # Call the generate_id_token method. + # result = client.generate_id_token request + # + # # The returned object is of type Google::Iam::Credentials::V1::GenerateIdTokenResponse. + # p result + # + def generate_id_token request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::GenerateIdTokenRequest + + # Converts hash and nil to an 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_id_token.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::Credentials::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_id_token.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_id_token.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_credentials_stub.generate_id_token request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Signs a blob using a service account's system-managed private key. + # + # @overload sign_blob(request, options = nil) + # Pass arguments to `sign_blob` via a request object, either of type + # {::Google::Iam::Credentials::V1::SignBlobRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::Credentials::V1::SignBlobRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload sign_blob(name: nil, delegates: nil, payload: nil) + # Pass arguments to `sign_blob` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param delegates [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param payload [::String] + # Required. The bytes to sign. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::Credentials::V1::SignBlobResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::Credentials::V1::SignBlobResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/credentials/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::Credentials::V1::SignBlobRequest.new + # + # # Call the sign_blob method. + # result = client.sign_blob request + # + # # The returned object is of type Google::Iam::Credentials::V1::SignBlobResponse. + # p result + # + def sign_blob request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::SignBlobRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.sign_blob.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::Credentials::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.sign_blob.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.sign_blob.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_credentials_stub.sign_blob request, options do |result, operation| + yield result, operation if block_given? + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Signs a JWT using a service account's system-managed private key. + # + # @overload sign_jwt(request, options = nil) + # Pass arguments to `sign_jwt` via a request object, either of type + # {::Google::Iam::Credentials::V1::SignJwtRequest} or an equivalent Hash. + # + # @param request [::Google::Iam::Credentials::V1::SignJwtRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload sign_jwt(name: nil, delegates: nil, payload: nil) + # Pass arguments to `sign_jwt` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or 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 service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param delegates [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @param payload [::String] + # Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Iam::Credentials::V1::SignJwtResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::Credentials::V1::SignJwtResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/iam/credentials/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Iam::Credentials::V1::SignJwtRequest.new + # + # # Call the sign_jwt method. + # result = client.sign_jwt request + # + # # The returned object is of type Google::Iam::Credentials::V1::SignJwtResponse. + # p result + # + def sign_jwt request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::SignJwtRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.sign_jwt.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Iam::Credentials::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.sign_jwt.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.sign_jwt.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @iam_credentials_stub.sign_jwt request, 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 IAMCredentials REST API. + # + # This class represents the configuration for IAMCredentials 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::Credentials::V1::IAMCredentials::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 + # # generate_access_token to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.generate_access_token.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.generate_access_token.timeout = 20.0 + # end + # + # @!attribute [rw] endpoint + # A custom service endpoint, as a hostname or hostname:port. The default is + # nil, indicating to use the default endpoint in the current universe domain. + # @return [::String,nil] + # @!attribute [rw] credentials + # Credentials to send with calls. You may provide any of the following types: + # * (`String`) The path to a service account key file in JSON format + # * (`Hash`) A service account key as a Hash + # * (`Google::Auth::Credentials`) A googleauth credentials object + # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) + # * (`Signet::OAuth2::Client`) A signet oauth2 client object + # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) + # * (`nil`) indicating no credentials + # + # Warning: If you accept a credential configuration (JSON file or Hash) from an + # external source for authentication to Google Cloud, you must validate it before + # providing it to a Google API client library. Providing an unvalidated credential + # configuration to Google APIs can compromise the security of your systems and data. + # For more information, refer to [Validate credential configurations from external + # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). + # @return [::Object] + # @!attribute [rw] scope + # The OAuth scopes + # @return [::Array<::String>] + # @!attribute [rw] lib_name + # The library name as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] lib_version + # The library version as recorded in instrumentation and logging + # @return [::String] + # @!attribute [rw] timeout + # The call timeout in seconds. + # @return [::Numeric] + # @!attribute [rw] metadata + # Additional headers to be sent with the call. + # @return [::Hash{::Symbol=>::String}] + # @!attribute [rw] retry_policy + # The retry policy. The value is a hash with the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # @return [::Hash] + # @!attribute [rw] quota_project + # A separate project against which to charge quota. + # @return [::String] + # @!attribute [rw] universe_domain + # The universe domain within which to make requests. This determines the + # default endpoint URL. The default value of nil uses the environment + # universe (usually the default "googleapis.com" universe). + # @return [::String,nil] + # @!attribute [rw] logger + # A custom logger to use for request/response debug logging, or the value + # `:default` (the default) to construct a default logger, or `nil` to + # explicitly disable logging. + # @return [::Logger,:default,nil] + # + class Configuration + extend ::Gapic::Config + + # @private + # The endpoint specific to the default "googleapis.com" universe. Deprecated. + DEFAULT_ENDPOINT = "iamcredentials.googleapis.com" + + config_attr :endpoint, nil, ::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 IAMCredentials API. + # + # Includes fields providing the configuration for each RPC in this service. + # Each configuration object is of type `Gapic::Config::Method` and includes + # the following configuration fields: + # + # * `timeout` (*type:* `Numeric`) - The call timeout in seconds + # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers + # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields + # include the following keys: + # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. + # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. + # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. + # * `:retry_codes` (*type:* `Array`) - The error codes that should + # trigger a retry. + # + class Rpcs + ## + # RPC-specific configuration for `generate_access_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_access_token + ## + # RPC-specific configuration for `generate_id_token` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_id_token + ## + # RPC-specific configuration for `sign_blob` + # @return [::Gapic::Config::Method] + # + attr_reader :sign_blob + ## + # RPC-specific configuration for `sign_jwt` + # @return [::Gapic::Config::Method] + # + attr_reader :sign_jwt + + # @private + def initialize parent_rpcs = nil + generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token + @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config + generate_id_token_config = parent_rpcs.generate_id_token if parent_rpcs.respond_to? :generate_id_token + @generate_id_token = ::Gapic::Config::Method.new generate_id_token_config + sign_blob_config = parent_rpcs.sign_blob if parent_rpcs.respond_to? :sign_blob + @sign_blob = ::Gapic::Config::Method.new sign_blob_config + sign_jwt_config = parent_rpcs.sign_jwt if parent_rpcs.respond_to? :sign_jwt + @sign_jwt = ::Gapic::Config::Method.new sign_jwt_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb new file mode 100644 index 000000000000..c6cfe4454df2 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb @@ -0,0 +1,329 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See 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/credentials/v1/iamcredentials_pb" + +module Google + module Iam + module Credentials + module V1 + module IAMCredentials + module Rest + ## + # REST service stub for the IAMCredentials 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 generate_access_token REST call + # + # @param request_pb [::Google::Iam::Credentials::V1::GenerateAccessTokenRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Credentials::V1::GenerateAccessTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] + # A result object deserialized from the server's reply + def generate_access_token request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_access_token_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_access_token", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::Credentials::V1::GenerateAccessTokenResponse.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_id_token REST call + # + # @param request_pb [::Google::Iam::Credentials::V1::GenerateIdTokenRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Credentials::V1::GenerateIdTokenResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] + # A result object deserialized from the server's reply + def generate_id_token request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_id_token_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_id_token", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::Credentials::V1::GenerateIdTokenResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the sign_blob REST call + # + # @param request_pb [::Google::Iam::Credentials::V1::SignBlobRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Credentials::V1::SignBlobResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::Credentials::V1::SignBlobResponse] + # A result object deserialized from the server's reply + def sign_blob request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_sign_blob_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "sign_blob", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::Credentials::V1::SignBlobResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the sign_jwt REST call + # + # @param request_pb [::Google::Iam::Credentials::V1::SignJwtRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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::Credentials::V1::SignJwtResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Iam::Credentials::V1::SignJwtResponse] + # A result object deserialized from the server's reply + def sign_jwt request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_sign_jwt_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "sign_jwt", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Iam::Credentials::V1::SignJwtResponse.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 generate_access_token REST call + # + # @param request_pb [::Google::Iam::Credentials::V1::GenerateAccessTokenRequest] + # 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_access_token_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:generateAccessToken", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/serviceAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_id_token REST call + # + # @param request_pb [::Google::Iam::Credentials::V1::GenerateIdTokenRequest] + # 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_id_token_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:generateIdToken", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/serviceAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the sign_blob REST call + # + # @param request_pb [::Google::Iam::Credentials::V1::SignBlobRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_sign_blob_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:signBlob", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/serviceAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the sign_jwt REST call + # + # @param request_pb [::Google::Iam::Credentials::V1::SignJwtRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_sign_jwt_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:signJwt", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/serviceAccounts/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb new file mode 100644 index 000000000000..6fd166a77a41 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/iam/credentials/v1/iamcredentials.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/iam/credentials/v1/common_pb' + + +descriptor_data = "\n.google/iam/credentials/v1/iamcredentials.proto\x12\x19google.iam.credentials.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a&google/iam/credentials/v1/common.proto2\xad\x07\n\x0eIAMCredentials\x12\xec\x01\n\x13GenerateAccessToken\x12\x35.google.iam.credentials.v1.GenerateAccessTokenRequest\x1a\x36.google.iam.credentials.v1.GenerateAccessTokenResponse\"f\xda\x41\x1dname,delegates,scope,lifetime\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken:\x01*\x12\xe4\x01\n\x0fGenerateIdToken\x12\x31.google.iam.credentials.v1.GenerateIdTokenRequest\x1a\x32.google.iam.credentials.v1.GenerateIdTokenResponse\"j\xda\x41%name,delegates,audience,include_email\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/serviceAccounts/*}:generateIdToken:\x01*\x12\xb9\x01\n\x08SignBlob\x12*.google.iam.credentials.v1.SignBlobRequest\x1a+.google.iam.credentials.v1.SignBlobResponse\"T\xda\x41\x16name,delegates,payload\x82\xd3\xe4\x93\x02\x35\"0/v1/{name=projects/*/serviceAccounts/*}:signBlob:\x01*\x12\xb5\x01\n\x07SignJwt\x12).google.iam.credentials.v1.SignJwtRequest\x1a*.google.iam.credentials.v1.SignJwtResponse\"S\xda\x41\x16name,delegates,payload\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/serviceAccounts/*}:signJwt:\x01*\x1aQ\xca\x41\x1diamcredentials.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xca\x01\n#com.google.cloud.iam.credentials.v1B\x13IAMCredentialsProtoP\x01ZEcloud.google.com/go/iam/credentials/apiv1/credentialspb;credentialspb\xf8\x01\x01\xaa\x02\x1fGoogle.Cloud.Iam.Credentials.V1\xca\x02\x1fGoogle\\Cloud\\Iam\\Credentials\\V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Iam + module Credentials + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb new file mode 100644 index 000000000000..a550a8f0fcfe --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb @@ -0,0 +1,59 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/iam/credentials/v1/iamcredentials.proto for package 'google.iam.credentials.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/iam/credentials/v1/iamcredentials_pb' + +module Google + module Iam + module Credentials + module V1 + module IAMCredentials + # A service account is a special type of Google account that belongs to your + # application or a virtual machine (VM), instead of to an individual end user. + # Your application assumes the identity of the service account to call Google + # APIs, so that the users aren't directly involved. + # + # Service account credentials are used to temporarily assume the identity + # of the service account. Supported credential types include OAuth 2.0 access + # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and + # more. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.iam.credentials.v1.IAMCredentials' + + # Generates an OAuth 2.0 access token for a service account. + rpc :GenerateAccessToken, ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest, ::Google::Iam::Credentials::V1::GenerateAccessTokenResponse + # Generates an OpenID Connect ID token for a service account. + rpc :GenerateIdToken, ::Google::Iam::Credentials::V1::GenerateIdTokenRequest, ::Google::Iam::Credentials::V1::GenerateIdTokenResponse + # Signs a blob using a service account's system-managed private key. + rpc :SignBlob, ::Google::Iam::Credentials::V1::SignBlobRequest, ::Google::Iam::Credentials::V1::SignBlobResponse + # Signs a JWT using a service account's system-managed private key. + rpc :SignJwt, ::Google::Iam::Credentials::V1::SignJwtRequest, ::Google::Iam::Credentials::V1::SignJwtResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb new file mode 100644 index 000000000000..68ade197545e --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/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/iam/credentials/v1/iam_credentials/rest" +require "google/iam/credentials/v1/version" + +module Google + module Iam + module Credentials + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/iam/credentials/v1/rest" + # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/version.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/version.rb new file mode 100644 index 000000000000..8e69fe1e8479 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/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 Iam + module Credentials + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/proto_docs/README.md b/owl-bot-staging/google-iam-credentials-v1/proto_docs/README.md new file mode 100644 index 000000000000..b9037a182cf2 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# IAM Service Account Credentials 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-iam-credentials-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/client.rb @@ -0,0 +1,473 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Api + # Required information for every language. + # @!attribute [rw] reference_docs_uri + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Link to automatically generated reference documentation. Example: + # https://cloud.google.com/nodejs/docs/reference/asset/latest + # @!attribute [rw] destinations + # @return [::Array<::Google::Api::ClientLibraryDestination>] + # The destination where API teams want this client library to be published. + # @!attribute [rw] selective_gapic_generation + # @return [::Google::Api::SelectiveGapicGeneration] + # Configuration for which RPCs should be generated in the GAPIC client. + class CommonLanguageSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Details about how and where to publish client libraries. + # @!attribute [rw] version + # @return [::String] + # Version of the API to apply these settings to. This is the full protobuf + # package for the API, ending in the version element. + # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + # @!attribute [rw] launch_stage + # @return [::Google::Api::LaunchStage] + # Launch stage of this version of the API. + # @!attribute [rw] rest_numeric_enums + # @return [::Boolean] + # When using transport=rest, the client request will encode enums as + # numbers rather than strings. + # @!attribute [rw] java_settings + # @return [::Google::Api::JavaSettings] + # Settings for legacy Java features, supported in the Service YAML. + # @!attribute [rw] cpp_settings + # @return [::Google::Api::CppSettings] + # Settings for C++ client libraries. + # @!attribute [rw] php_settings + # @return [::Google::Api::PhpSettings] + # Settings for PHP client libraries. + # @!attribute [rw] python_settings + # @return [::Google::Api::PythonSettings] + # Settings for Python client libraries. + # @!attribute [rw] node_settings + # @return [::Google::Api::NodeSettings] + # Settings for Node client libraries. + # @!attribute [rw] dotnet_settings + # @return [::Google::Api::DotnetSettings] + # Settings for .NET client libraries. + # @!attribute [rw] ruby_settings + # @return [::Google::Api::RubySettings] + # Settings for Ruby client libraries. + # @!attribute [rw] go_settings + # @return [::Google::Api::GoSettings] + # Settings for Go client libraries. + class ClientLibrarySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # This message configures the settings for publishing [Google Cloud Client + # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) + # generated from the service config. + # @!attribute [rw] method_settings + # @return [::Array<::Google::Api::MethodSettings>] + # A list of API method settings, e.g. the behavior for methods that use the + # long-running operation pattern. + # @!attribute [rw] new_issue_uri + # @return [::String] + # Link to a *public* URI where users can report issues. Example: + # https://issuetracker.google.com/issues/new?component=190865&template=1161103 + # @!attribute [rw] documentation_uri + # @return [::String] + # Link to product home page. Example: + # https://cloud.google.com/asset-inventory/docs/overview + # @!attribute [rw] api_short_name + # @return [::String] + # Used as a tracking tag when collecting data about the APIs developer + # relations artifacts like docs, packages delivered to package managers, + # etc. Example: "speech". + # @!attribute [rw] github_label + # @return [::String] + # GitHub label to apply to issues and pull requests opened for this API. + # @!attribute [rw] codeowner_github_teams + # @return [::Array<::String>] + # GitHub teams to be added to CODEOWNERS in the directory in GitHub + # containing source code for the client libraries for this API. + # @!attribute [rw] doc_tag_prefix + # @return [::String] + # A prefix used in sample code when demarking regions to be included in + # documentation. + # @!attribute [rw] organization + # @return [::Google::Api::ClientLibraryOrganization] + # For whom the client library is being published. + # @!attribute [rw] library_settings + # @return [::Array<::Google::Api::ClientLibrarySettings>] + # Client library settings. If the same version string appears multiple + # times in this list, then the last one wins. Settings from earlier + # settings with the same version string are discarded. + # @!attribute [rw] proto_reference_documentation_uri + # @return [::String] + # Optional link to proto reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rpc + # @!attribute [rw] rest_reference_documentation_uri + # @return [::String] + # Optional link to REST reference documentation. Example: + # https://cloud.google.com/pubsub/lite/docs/reference/rest + class Publishing + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Java client libraries. + # @!attribute [rw] library_package + # @return [::String] + # The package name to use in Java. Clobbers the java_package option + # set in the protobuf. This should be used **only** by APIs + # who have already set the language_settings.java.package_name" field + # in gapic.yaml. API teams should use the protobuf java_package option + # where possible. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # library_package: com.google.cloud.pubsub.v1 + # @!attribute [rw] service_class_names + # @return [::Google::Protobuf::Map{::String => ::String}] + # Configure the Java class name to use instead of the service's for its + # corresponding generated GAPIC client. Keys are fully-qualified + # service names as they appear in the protobuf (including the full + # the language_settings.java.interface_names" field in gapic.yaml. API + # teams should otherwise use the service name as it appears in the + # protobuf. + # + # Example of a YAML configuration:: + # + # publishing: + # java_settings: + # service_class_names: + # - google.pubsub.v1.Publisher: TopicAdmin + # - google.pubsub.v1.Subscriber: SubscriptionAdmin + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class JavaSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class ServiceClassNamesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for C++ client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class CppSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Php client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class PhpSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Python client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] experimental_features + # @return [::Google::Api::PythonSettings::ExperimentalFeatures] + # Experimental features to be included during client library generation. + class PythonSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Experimental features to be included during client library generation. + # These fields will be deprecated once the feature graduates and is enabled + # by default. + # @!attribute [rw] rest_async_io_enabled + # @return [::Boolean] + # Enables generation of asynchronous REST clients if `rest` transport is + # enabled. By default, asynchronous REST clients will not be generated. + # This feature will be enabled by default 1 month after launching the + # feature in preview packages. + # @!attribute [rw] protobuf_pythonic_types_enabled + # @return [::Boolean] + # Enables generation of protobuf code using new types that are more + # Pythonic which are included in `protobuf>=5.29.x`. This feature will be + # enabled by default 1 month after launching the feature in preview + # packages. + # @!attribute [rw] unversioned_package_disabled + # @return [::Boolean] + # Disables generation of an unversioned Python package for this client + # library. This means that the module names will need to be versioned in + # import statements. For example `import google.cloud.library_v2` instead + # of `import google.cloud.library`. + class ExperimentalFeatures + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Node client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class NodeSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Dotnet client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from original service names to renamed versions. + # This is used when the default generated types + # would cause a naming conflict. (Neither name is + # fully-qualified.) + # Example: Subscriber to SubscriberServiceApi. + # @!attribute [rw] renamed_resources + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map from full resource types to the effective short name + # for the resource. This is used when otherwise resource + # named from different services would cause naming collisions. + # Example entry: + # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + # @!attribute [rw] ignored_resources + # @return [::Array<::String>] + # List of full resource types to ignore during generation. + # This is typically used for API-specific Location resources, + # which should be handled by the generator as if they were actually + # the common Location resources. + # Example entry: "documentai.googleapis.com/Location" + # @!attribute [rw] forced_namespace_aliases + # @return [::Array<::String>] + # Namespaces which must be aliased in snippets due to + # a known (but non-generator-predictable) naming collision + # @!attribute [rw] handwritten_signatures + # @return [::Array<::String>] + # Method signatures (in the form "service.method(signature)") + # which are provided separately, so shouldn't be generated. + # Snippets *calling* these methods are still generated, however. + class DotnetSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedResourcesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Settings for Ruby client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + class RubySettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Settings for Go client libraries. + # @!attribute [rw] common + # @return [::Google::Api::CommonLanguageSettings] + # Some settings. + # @!attribute [rw] renamed_services + # @return [::Google::Protobuf::Map{::String => ::String}] + # Map of service names to renamed services. Keys are the package relative + # service names and values are the name to be used for the service client + # and call options. + # + # publishing: + # go_settings: + # renamed_services: + # Publisher: TopicAdmin + class GoSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class RenamedServicesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes the generator configuration for a method. + # @!attribute [rw] selector + # @return [::String] + # The fully qualified name of the method, for which the options below apply. + # This is used to find the method to apply the options. + # + # Example: + # + # publishing: + # method_settings: + # - selector: google.storage.control.v2.StorageControl.CreateFolder + # # method settings for CreateFolder... + # @!attribute [rw] long_running + # @return [::Google::Api::MethodSettings::LongRunning] + # Describes settings to use for long-running operations when generating + # API methods for RPCs. Complements RPCs that use the annotations in + # google/longrunning/operations.proto. + # + # Example of a YAML configuration:: + # + # publishing: + # method_settings: + # - selector: google.cloud.speech.v2.Speech.BatchRecognize + # long_running: + # initial_poll_delay: 60s # 1 minute + # poll_delay_multiplier: 1.5 + # max_poll_delay: 360s # 6 minutes + # total_poll_timeout: 54000s # 90 minutes + # @!attribute [rw] auto_populated_fields + # @return [::Array<::String>] + # List of top-level fields of the request message, that should be + # automatically populated by the client libraries based on their + # (google.api.field_info).format. Currently supported format: UUID4. + # + # Example of a YAML configuration: + # + # publishing: + # method_settings: + # - selector: google.example.v1.ExampleService.CreateExample + # auto_populated_fields: + # - request_id + class MethodSettings + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes settings to use when generating API methods that use the + # long-running operation pattern. + # All default values below are from those used in the client library + # generators (e.g. + # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + # @!attribute [rw] initial_poll_delay + # @return [::Google::Protobuf::Duration] + # Initial delay after which the first poll request will be made. + # Default value: 5 seconds. + # @!attribute [rw] poll_delay_multiplier + # @return [::Float] + # Multiplier to gradually increase delay between subsequent polls until it + # reaches max_poll_delay. + # Default value: 1.5. + # @!attribute [rw] max_poll_delay + # @return [::Google::Protobuf::Duration] + # Maximum time between two subsequent poll requests. + # Default value: 45 seconds. + # @!attribute [rw] total_poll_timeout + # @return [::Google::Protobuf::Duration] + # Total polling timeout. + # Default value: 5 minutes. + class LongRunning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # This message is used to configure the generation of a subset of the RPCs in + # a service for client libraries. + # @!attribute [rw] methods + # @return [::Array<::String>] + # An allowlist of the fully qualified names of RPCs that should be included + # on public client surfaces. + # @!attribute [rw] generate_omitted_as_internal + # @return [::Boolean] + # Setting this to true indicates to the client generators that methods + # that would be excluded from the generation should instead be generated + # in a way that indicates these methods should not be consumed by + # end users. How this is expressed is up to individual language + # implementations to decide. Some examples may be: added annotations, + # obfuscated identifiers, or other language idiomatic patterns. + class SelectiveGapicGeneration + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The organization for which the client libraries are being published. + # Affects the url where generated docs are published, etc. + module ClientLibraryOrganization + # Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 + + # Google Cloud Platform Org. + CLOUD = 1 + + # Ads (Advertising) Org. + ADS = 2 + + # Photos Org. + PHOTOS = 3 + + # Street View Org. + STREET_VIEW = 4 + + # Shopping Org. + SHOPPING = 5 + + # Geo Org. + GEO = 6 + + # Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7 + end + + # To where should client libraries be published? + module ClientLibraryDestination + # Client libraries will neither be generated nor published to package + # managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 + + # Generate the client library in a repo under github.com/googleapis, + # but don't publish it to package managers. + GITHUB = 10 + + # Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20 + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb new file mode 100644 index 000000000000..87dc4a4ab1ff --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb @@ -0,0 +1,186 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module Credentials + module V1 + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @!attribute [rw] delegates + # @return [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @!attribute [rw] scope + # @return [::Array<::String>] + # Required. Code to identify the scopes to be included in the OAuth 2.0 access token. + # See https://developers.google.com/identity/protocols/googlescopes for more + # information. + # At least one value required. + # @!attribute [rw] lifetime + # @return [::Google::Protobuf::Duration] + # The desired lifetime duration of the access token in seconds. + # Must be set to a value less than or equal to 3600 (1 hour). If a value is + # not specified, the token's lifetime will be set to a default value of one + # hour. + class GenerateAccessTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] access_token + # @return [::String] + # The OAuth 2.0 access token. + # @!attribute [rw] expire_time + # @return [::Google::Protobuf::Timestamp] + # Token expiration time. + # The expiration time is always set. + class GenerateAccessTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @!attribute [rw] delegates + # @return [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @!attribute [rw] payload + # @return [::String] + # Required. The bytes to sign. + class SignBlobRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key_id + # @return [::String] + # The ID of the key used to sign the blob. + # @!attribute [rw] signed_blob + # @return [::String] + # The signed blob. + class SignBlobResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @!attribute [rw] delegates + # @return [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @!attribute [rw] payload + # @return [::String] + # Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. + class SignJwtRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key_id + # @return [::String] + # The ID of the key used to sign the JWT. + # @!attribute [rw] signed_jwt + # @return [::String] + # The signed JWT. + class SignJwtResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the service account for which the credentials + # are requested, in the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @!attribute [rw] delegates + # @return [::Array<::String>] + # The sequence of service accounts in a delegation chain. Each service + # account must be granted the `roles/iam.serviceAccountTokenCreator` role + # on its next service account in the chain. The last service account in the + # chain must be granted the `roles/iam.serviceAccountTokenCreator` role + # on the service account that is specified in the `name` field of the + # request. + # + # The delegates must have the following format: + # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard + # character is required; replacing it with a project ID is invalid. + # @!attribute [rw] audience + # @return [::String] + # Required. The audience for the token, such as the API or account that this token + # grants access to. + # @!attribute [rw] include_email + # @return [::Boolean] + # Include the service account email in the token. If set to `true`, the + # token will contain `email` and `email_verified` claims. + class GenerateIdTokenRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] token + # @return [::String] + # The OpenId Connect ID token. + class GenerateIdTokenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb @@ -0,0 +1,127 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Protobuf + # A Timestamp represents a point in time independent of any time zone or local + # calendar, encoded as a count of seconds and fractions of seconds at + # nanosecond resolution. The count is relative to an epoch at UTC midnight on + # January 1, 1970, in the proleptic Gregorian calendar which extends the + # Gregorian calendar backwards to year one. + # + # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap + # second table is needed for interpretation, using a [24-hour linear + # smear](https://developers.google.com/time/smear). + # + # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By + # restricting to that range, we ensure that we can convert to and from [RFC + # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. + # + # # Examples + # + # Example 1: Compute Timestamp from POSIX `time()`. + # + # Timestamp timestamp; + # timestamp.set_seconds(time(NULL)); + # timestamp.set_nanos(0); + # + # Example 2: Compute Timestamp from POSIX `gettimeofday()`. + # + # struct timeval tv; + # gettimeofday(&tv, NULL); + # + # Timestamp timestamp; + # timestamp.set_seconds(tv.tv_sec); + # timestamp.set_nanos(tv.tv_usec * 1000); + # + # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. + # + # FILETIME ft; + # GetSystemTimeAsFileTime(&ft); + # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; + # + # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z + # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. + # Timestamp timestamp; + # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); + # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); + # + # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. + # + # long millis = System.currentTimeMillis(); + # + # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) + # .setNanos((int) ((millis % 1000) * 1000000)).build(); + # + # Example 5: Compute Timestamp from Java `Instant.now()`. + # + # Instant now = Instant.now(); + # + # Timestamp timestamp = + # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) + # .setNanos(now.getNano()).build(); + # + # Example 6: Compute Timestamp from current time in Python. + # + # timestamp = Timestamp() + # timestamp.GetCurrentTime() + # + # # JSON Mapping + # + # In JSON format, the Timestamp type is encoded as a string in the + # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the + # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" + # where \\{year} is always expressed using four digits while \\{month}, \\{day}, + # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional + # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), + # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone + # is required. A proto3 JSON serializer should always use UTC (as indicated by + # "Z") when printing the Timestamp type and a proto3 JSON parser should be + # able to accept both UTC and other timezones (as indicated by an offset). + # + # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past + # 01:30 UTC on January 15, 2017. + # + # In JavaScript, one can convert a Date object to this format using the + # standard + # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) + # method. In Python, a standard `datetime.datetime` object can be converted + # to this format using + # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with + # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use + # the Joda Time's [`ISODateTimeFormat.dateTime()`]( + # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() + # ) to obtain a formatter capable of generating timestamps in this format. + # @!attribute [rw] seconds + # @return [::Integer] + # Represents seconds of UTC time since Unix epoch + # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to + # 9999-12-31T23:59:59Z inclusive. + # @!attribute [rw] nanos + # @return [::Integer] + # Non-negative fractions of a second at nanosecond resolution. Negative + # second values with fractions must still have non-negative nanos values + # that count forward in time. Must be from 0 to 999,999,999 + # inclusive. + class Timestamp + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/Gemfile b/owl-bot-staging/google-iam-credentials-v1/snippets/Gemfile new file mode 100644 index 000000000000..68414f33ff49 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1", path: "../" +else + gem "google-iam-credentials-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-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb new file mode 100644 index 000000000000..9ba589bd6910 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync] +require "google/iam/credentials/v1" + +## +# Snippet for the generate_access_token call in the IAMCredentials service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::Credentials::V1::IAMCredentials::Client#generate_access_token. +# +def generate_access_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::Credentials::V1::IAMCredentials::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new + + # Call the generate_access_token method. + result = client.generate_access_token request + + # The returned object is of type Google::Iam::Credentials::V1::GenerateAccessTokenResponse. + p result +end +# [END iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync] diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb new file mode 100644 index 000000000000..4a1c3491483f --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync] +require "google/iam/credentials/v1" + +## +# Snippet for the generate_id_token call in the IAMCredentials service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::Credentials::V1::IAMCredentials::Client#generate_id_token. +# +def generate_id_token + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::Credentials::V1::IAMCredentials::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::Credentials::V1::GenerateIdTokenRequest.new + + # Call the generate_id_token method. + result = client.generate_id_token request + + # The returned object is of type Google::Iam::Credentials::V1::GenerateIdTokenResponse. + p result +end +# [END iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync] diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb new file mode 100644 index 000000000000..27272c74919b --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iamcredentials_v1_generated_IAMCredentials_SignBlob_sync] +require "google/iam/credentials/v1" + +## +# Snippet for the sign_blob call in the IAMCredentials service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::Credentials::V1::IAMCredentials::Client#sign_blob. +# +def sign_blob + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::Credentials::V1::IAMCredentials::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::Credentials::V1::SignBlobRequest.new + + # Call the sign_blob method. + result = client.sign_blob request + + # The returned object is of type Google::Iam::Credentials::V1::SignBlobResponse. + p result +end +# [END iamcredentials_v1_generated_IAMCredentials_SignBlob_sync] diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb new file mode 100644 index 000000000000..806a57c1515f --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# [START iamcredentials_v1_generated_IAMCredentials_SignJwt_sync] +require "google/iam/credentials/v1" + +## +# Snippet for the sign_jwt call in the IAMCredentials service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating 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::Credentials::V1::IAMCredentials::Client#sign_jwt. +# +def sign_jwt + # Create a client object. The client can be reused for multiple calls. + client = Google::Iam::Credentials::V1::IAMCredentials::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Iam::Credentials::V1::SignJwtRequest.new + + # Call the sign_jwt method. + result = client.sign_jwt request + + # The returned object is of type Google::Iam::Credentials::V1::SignJwtResponse. + p result +end +# [END iamcredentials_v1_generated_IAMCredentials_SignJwt_sync] diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/snippet_metadata_google.iam.credentials.v1.json b/owl-bot-staging/google-iam-credentials-v1/snippets/snippet_metadata_google.iam.credentials.v1.json new file mode 100644 index 000000000000..6ca1e368089a --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/snippets/snippet_metadata_google.iam.credentials.v1.json @@ -0,0 +1,175 @@ +{ + "client_library": { + "name": "google-iam-credentials-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.iam.credentials.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync", + "title": "Snippet for the generate_access_token call in the IAMCredentials service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::Credentials::V1::IAMCredentials::Client#generate_access_token.", + "file": "iam_credentials/generate_access_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_access_token", + "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client#generate_access_token", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::Credentials::V1::GenerateAccessTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::Credentials::V1::GenerateAccessTokenResponse", + "client": { + "short_name": "IAMCredentials::Client", + "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client" + }, + "method": { + "short_name": "GenerateAccessToken", + "full_name": "google.iam.credentials.v1.IAMCredentials.GenerateAccessToken", + "service": { + "short_name": "IAMCredentials", + "full_name": "google.iam.credentials.v1.IAMCredentials" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync", + "title": "Snippet for the generate_id_token call in the IAMCredentials service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::Credentials::V1::IAMCredentials::Client#generate_id_token.", + "file": "iam_credentials/generate_id_token.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_id_token", + "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client#generate_id_token", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::Credentials::V1::GenerateIdTokenRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::Credentials::V1::GenerateIdTokenResponse", + "client": { + "short_name": "IAMCredentials::Client", + "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client" + }, + "method": { + "short_name": "GenerateIdToken", + "full_name": "google.iam.credentials.v1.IAMCredentials.GenerateIdToken", + "service": { + "short_name": "IAMCredentials", + "full_name": "google.iam.credentials.v1.IAMCredentials" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iamcredentials_v1_generated_IAMCredentials_SignBlob_sync", + "title": "Snippet for the sign_blob call in the IAMCredentials service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::Credentials::V1::IAMCredentials::Client#sign_blob.", + "file": "iam_credentials/sign_blob.rb", + "language": "RUBY", + "client_method": { + "short_name": "sign_blob", + "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client#sign_blob", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::Credentials::V1::SignBlobRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::Credentials::V1::SignBlobResponse", + "client": { + "short_name": "IAMCredentials::Client", + "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client" + }, + "method": { + "short_name": "SignBlob", + "full_name": "google.iam.credentials.v1.IAMCredentials.SignBlob", + "service": { + "short_name": "IAMCredentials", + "full_name": "google.iam.credentials.v1.IAMCredentials" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "iamcredentials_v1_generated_IAMCredentials_SignJwt_sync", + "title": "Snippet for the sign_jwt call in the IAMCredentials service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::Credentials::V1::IAMCredentials::Client#sign_jwt.", + "file": "iam_credentials/sign_jwt.rb", + "language": "RUBY", + "client_method": { + "short_name": "sign_jwt", + "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client#sign_jwt", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::Credentials::V1::SignJwtRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::Credentials::V1::SignJwtResponse", + "client": { + "short_name": "IAMCredentials::Client", + "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client" + }, + "method": { + "short_name": "SignJwt", + "full_name": "google.iam.credentials.v1.IAMCredentials.SignJwt", + "service": { + "short_name": "IAMCredentials", + "full_name": "google.iam.credentials.v1.IAMCredentials" + } + } + }, + "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-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb b/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb new file mode 100644 index 000000000000..3a872d20e5a0 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_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/iam/credentials/v1/iam_credentials" + +class ::Google::Iam::Credentials::V1::IAMCredentials::ClientPathsTest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_service_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_account_path project: "value0", service_account: "value1" + assert_equal "projects/value0/serviceAccounts/value1", path + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb b/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb new file mode 100644 index 000000000000..1c350f0ecfba --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.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! + +require "helper" +require "gapic/rest" +require "google/iam/credentials/v1/iamcredentials_pb" +require "google/iam/credentials/v1/iam_credentials/rest" + + +class ::Google::Iam::Credentials::V1::IAMCredentials::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_generate_access_token + # Create test objects. + client_result = ::Google::Iam::Credentials::V1::GenerateAccessTokenResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delegates = ["hello world"] + scope = ["hello world"] + lifetime = {} + + generate_access_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::Credentials::V1::IAMCredentials::Rest::ServiceStub.stub :transcode_generate_access_token_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_access_token_client_stub do + # Create client + client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_access_token({ name: name, delegates: delegates, scope: scope, lifetime: lifetime }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_access_token name: name, delegates: delegates, scope: scope, lifetime: lifetime do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_access_token ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new(name: name, delegates: delegates, scope: scope, lifetime: lifetime) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_access_token({ name: name, delegates: delegates, scope: scope, lifetime: lifetime }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_access_token(::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new(name: name, delegates: delegates, scope: scope, lifetime: lifetime), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_access_token_client_stub.call_count + end + end + end + + def test_generate_id_token + # Create test objects. + client_result = ::Google::Iam::Credentials::V1::GenerateIdTokenResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delegates = ["hello world"] + audience = "hello world" + include_email = true + + generate_id_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::Credentials::V1::IAMCredentials::Rest::ServiceStub.stub :transcode_generate_id_token_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_id_token_client_stub do + # Create client + client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_id_token({ name: name, delegates: delegates, audience: audience, include_email: include_email }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_id_token name: name, delegates: delegates, audience: audience, include_email: include_email do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_id_token ::Google::Iam::Credentials::V1::GenerateIdTokenRequest.new(name: name, delegates: delegates, audience: audience, include_email: include_email) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_id_token({ name: name, delegates: delegates, audience: audience, include_email: include_email }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_id_token(::Google::Iam::Credentials::V1::GenerateIdTokenRequest.new(name: name, delegates: delegates, audience: audience, include_email: include_email), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_id_token_client_stub.call_count + end + end + end + + def test_sign_blob + # Create test objects. + client_result = ::Google::Iam::Credentials::V1::SignBlobResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delegates = ["hello world"] + payload = "hello world" + + sign_blob_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Iam::Credentials::V1::IAMCredentials::Rest::ServiceStub.stub :transcode_sign_blob_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, sign_blob_client_stub do + # Create client + client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.sign_blob({ name: name, delegates: delegates, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.sign_blob name: name, delegates: delegates, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.sign_blob ::Google::Iam::Credentials::V1::SignBlobRequest.new(name: name, delegates: delegates, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.sign_blob({ name: name, delegates: delegates, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.sign_blob(::Google::Iam::Credentials::V1::SignBlobRequest.new(name: name, delegates: delegates, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, sign_blob_client_stub.call_count + end + end + end + + def test_sign_jwt + # Create test objects. + client_result = ::Google::Iam::Credentials::V1::SignJwtResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delegates = ["hello world"] + payload = "hello world" + + sign_jwt_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"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::Credentials::V1::IAMCredentials::Rest::ServiceStub.stub :transcode_sign_jwt_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, sign_jwt_client_stub do + # Create client + client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.sign_jwt({ name: name, delegates: delegates, payload: payload }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.sign_jwt name: name, delegates: delegates, payload: payload do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.sign_jwt ::Google::Iam::Credentials::V1::SignJwtRequest.new(name: name, delegates: delegates, payload: payload) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.sign_jwt({ name: name, delegates: delegates, payload: payload }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.sign_jwt(::Google::Iam::Credentials::V1::SignJwtRequest.new(name: name, delegates: delegates, payload: payload), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, sign_jwt_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::Credentials::V1::IAMCredentials::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::Credentials::V1::IAMCredentials::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb b/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb new file mode 100644 index 000000000000..3953d3ced1aa --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb @@ -0,0 +1,356 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing 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/credentials/v1/iamcredentials_pb" +require "google/iam/credentials/v1/iam_credentials" + +class ::Google::Iam::Credentials::V1::IAMCredentials::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_generate_access_token + # Create GRPC objects. + grpc_response = ::Google::Iam::Credentials::V1::GenerateAccessTokenResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delegates = ["hello world"] + scope = ["hello world"] + lifetime = {} + + generate_access_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_access_token, name + assert_kind_of ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["delegates"] + assert_equal ["hello world"], request["scope"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["lifetime"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_access_token_client_stub do + # Create client + client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_access_token({ name: name, delegates: delegates, scope: scope, lifetime: lifetime }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_access_token name: name, delegates: delegates, scope: scope, lifetime: lifetime do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_access_token ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new(name: name, delegates: delegates, scope: scope, lifetime: lifetime) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_access_token({ name: name, delegates: delegates, scope: scope, lifetime: lifetime }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_access_token(::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new(name: name, delegates: delegates, scope: scope, lifetime: lifetime), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_access_token_client_stub.call_rpc_count + end + end + + def test_generate_id_token + # Create GRPC objects. + grpc_response = ::Google::Iam::Credentials::V1::GenerateIdTokenResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delegates = ["hello world"] + audience = "hello world" + include_email = true + + generate_id_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_id_token, name + assert_kind_of ::Google::Iam::Credentials::V1::GenerateIdTokenRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["delegates"] + assert_equal "hello world", request["audience"] + assert_equal true, request["include_email"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_id_token_client_stub do + # Create client + client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_id_token({ name: name, delegates: delegates, audience: audience, include_email: include_email }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_id_token name: name, delegates: delegates, audience: audience, include_email: include_email do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_id_token ::Google::Iam::Credentials::V1::GenerateIdTokenRequest.new(name: name, delegates: delegates, audience: audience, include_email: include_email) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_id_token({ name: name, delegates: delegates, audience: audience, include_email: include_email }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_id_token(::Google::Iam::Credentials::V1::GenerateIdTokenRequest.new(name: name, delegates: delegates, audience: audience, include_email: include_email), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_id_token_client_stub.call_rpc_count + end + end + + def test_sign_blob + # Create GRPC objects. + grpc_response = ::Google::Iam::Credentials::V1::SignBlobResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delegates = ["hello world"] + payload = "hello world" + + sign_blob_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :sign_blob, name + assert_kind_of ::Google::Iam::Credentials::V1::SignBlobRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["delegates"] + assert_equal "hello world", request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, sign_blob_client_stub do + # Create client + client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.sign_blob({ name: name, delegates: delegates, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.sign_blob name: name, delegates: delegates, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.sign_blob ::Google::Iam::Credentials::V1::SignBlobRequest.new(name: name, delegates: delegates, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.sign_blob({ name: name, delegates: delegates, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.sign_blob(::Google::Iam::Credentials::V1::SignBlobRequest.new(name: name, delegates: delegates, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, sign_blob_client_stub.call_rpc_count + end + end + + def test_sign_jwt + # Create GRPC objects. + grpc_response = ::Google::Iam::Credentials::V1::SignJwtResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + delegates = ["hello world"] + payload = "hello world" + + sign_jwt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :sign_jwt, name + assert_kind_of ::Google::Iam::Credentials::V1::SignJwtRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["delegates"] + assert_equal "hello world", request["payload"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, sign_jwt_client_stub do + # Create client + client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.sign_jwt({ name: name, delegates: delegates, payload: payload }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.sign_jwt name: name, delegates: delegates, payload: payload do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.sign_jwt ::Google::Iam::Credentials::V1::SignJwtRequest.new(name: name, delegates: delegates, payload: payload) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.sign_jwt({ name: name, delegates: delegates, payload: payload }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.sign_jwt(::Google::Iam::Credentials::V1::SignJwtRequest.new(name: name, delegates: delegates, payload: payload), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, sign_jwt_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::Credentials::V1::IAMCredentials::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::Credentials::V1::IAMCredentials::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::Credentials::V1::IAMCredentials::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Iam::Credentials::V1::IAMCredentials::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-iam-credentials-v1/test/helper.rb b/owl-bot-staging/google-iam-credentials-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-iam-credentials/.gitignore b/owl-bot-staging/google-iam-credentials/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/.gitignore @@ -0,0 +1,22 @@ +# Ignore bundler lockfiles +Gemfile.lock +gems.locked + +# Ignore documentation output +doc/* +.yardoc/* + +# Ignore test output +coverage/* + +# Ignore build artifacts +pkg/* + +# Ignore files commonly present in certain dev environments +.vagrant +.DS_STORE +.idea +*.iml + +# Ignore synth output +__pycache__ diff --git a/owl-bot-staging/google-iam-credentials/.repo-metadata.json b/owl-bot-staging/google-iam-credentials/.repo-metadata.json new file mode 100644 index 000000000000..47107e333757 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "iamcredentials.googleapis.com", + "api_shortname": "iamcredentials", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-credentials/latest", + "distribution_name": "google-iam-credentials", + "is_cloud": true, + "language": "ruby", + "name": "iamcredentials", + "name_pretty": "IAM Service Account Credentials API", + "product_documentation": "https://cloud.google.com/iam", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens.", + "ruby-cloud-env-prefix": "IAM_CREDENTIALS", + "ruby-cloud-product-url": "https://cloud.google.com/iam", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-iam-credentials/.rubocop.yml b/owl-bot-staging/google-iam-credentials/.rubocop.yml new file mode 100644 index 000000000000..d00a4e58fa85 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-iam-credentials.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +Metrics/AbcSize: + Enabled: false +Metrics/ClassLength: + Enabled: false +Metrics/CyclomaticComplexity: + Enabled: false +Metrics/MethodLength: + Enabled: false +Metrics/ModuleLength: + Enabled: false +Metrics/PerceivedComplexity: + Enabled: false + +Naming/FileName: + Exclude: + - "lib/google-iam-credentials.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-iam-credentials/.toys.rb b/owl-bot-staging/google-iam-credentials/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/.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-iam-credentials/.yardopts b/owl-bot-staging/google-iam-credentials/.yardopts new file mode 100644 index 000000000000..becb6cbe272b --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="IAM Service Account Credentials API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-iam-credentials/AUTHENTICATION.md b/owl-bot-staging/google-iam-credentials/AUTHENTICATION.md new file mode 100644 index 000000000000..b029fd4dd543 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-iam-credentials 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-iam-credentials 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/iam/credentials" + +client = Google::Iam::Credentials.iam_credentials do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/iam/credentials" + +Google::Iam::Credentials.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Iam::Credentials.iam_credentials +``` + +### 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-iam-credentials +checks for credentials are: + +* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents +* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file + +```ruby +require "google/iam/credentials" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Iam::Credentials.iam_credentials +``` + +### 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-iam-credentials/CHANGELOG.md b/owl-bot-staging/google-iam-credentials/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-iam-credentials/Gemfile b/owl-bot-staging/google-iam-credentials/Gemfile new file mode 100644 index 000000000000..40c5f0fcef06 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-iam-credentials-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-iam-credentials.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-credentials/LICENSE.md b/owl-bot-staging/google-iam-credentials/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/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-iam-credentials/README.md b/owl-bot-staging/google-iam-credentials/README.md new file mode 100644 index 000000000000..89d1eb98fa95 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the IAM Service Account Credentials API + +API Client library for the IAM Service Account Credentials API + +The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-iam-credentials-v*`. +The gem `google-iam-credentials` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-credentials/latest) +for this library, google-iam-credentials, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-iam-credentials-v1](https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/iam) +for more usage information. + +## Quick Start + +``` +$ gem install google-iam-credentials +``` + +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/iamcredentials.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/iam/credentials" + +client = Google::Iam::Credentials.iam_credentials +request = ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new # (request fields as keyword arguments...) +response = client.generate_access_token request +``` + +## Debug Logging + +This library comes with opt-in Debug Logging that can help you troubleshoot +your application's integration with the API. When logging is activated, key +events such as requests and responses, along with data payloads and metadata +such as headers and client configuration, are logged to the standard error +stream. + +**WARNING:** Client Library Debug Logging includes your data payloads in +plaintext, which could include sensitive data such as PII for yourself or your +customers, private keys, or other security data that could be compromising if +leaked. Always practice good data hygiene with your application logs, and follow +the principle of least access. Google also recommends that Client Library Debug +Logging be enabled only temporarily during active debugging, and not used +permanently in production. + +To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` +to the value `all`. Alternatively, you can set the value to a comma-delimited +list of client library gem names. This will select the default logging behavior, +which writes logs to the standard error stream. On a local workstation, this may +result in logs appearing on the console. When running on a Google Cloud hosting +service such as [Google Cloud Run](https://cloud.google.com/run), this generally +results in logs appearing alongside your application logs in the +[Google Cloud Logging](https://cloud.google.com/logging/) service. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-iam-credentials-v1](https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest). + +## Supported Ruby Versions + +This library is supported on Ruby 3.0+. + +Google provides official support for Ruby versions that are actively supported +by Ruby Core—that is, Ruby versions that are either in normal maintenance or +in security maintenance, and not end of life. Older versions of Ruby _may_ +still work, but are unsupported and not recommended. See +https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby +support schedule. + +## Which client should I use? + +Most modern Ruby client libraries for Google APIs come in two flavors: the main +client library with a name such as `google-iam-credentials`, +and lower-level _versioned_ client libraries with names such as +`google-iam-credentials-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-iam-credentials`. +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-iam-credentials-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-iam-credentials/Rakefile b/owl-bot-staging/google-iam-credentials/Rakefile new file mode 100644 index 000000000000..124a313e8f1a --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/Rakefile @@ -0,0 +1,169 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "bundler/setup" +require "bundler/gem_tasks" + +require "rubocop/rake_task" +RuboCop::RakeTask.new + +require "rake/testtask" +desc "Run tests." +Rake::TestTask.new do |t| + t.libs << "test" + t.test_files = FileList["test/**/*_test.rb"] + t.warning = true +end + +desc "Runs the smoke tests." +Rake::TestTask.new :smoke_test do |t| + t.test_files = FileList["acceptance/**/*smoke_test.rb"] + t.warning = false +end + +# Acceptance tests +desc "Run the google-iam-credentials acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["IAM_CREDENTIALS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["IAM_CREDENTIALS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["IAM_CREDENTIALS_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 IAM_CREDENTIALS_TEST_PROJECT=test123 IAM_CREDENTIALS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/iam/credentials/v1/iam_credentials/credentials" + ::Google::Iam::Credentials::V1::IAMCredentials::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["IAM_CREDENTIALS_PROJECT"] = project + ENV["IAM_CREDENTIALS_TEST_PROJECT"] = project + ENV["IAM_CREDENTIALS_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-iam-credentials 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-iam-credentials 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-iam-credentials 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-iam-credentials gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-iam-credentials" + header "google-iam-credentials rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-iam-credentials yard", "*" + Rake::Task[:yard].invoke + header "google-iam-credentials 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-iam-credentials 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-iam-credentials 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-iam-credentials/google-iam-credentials.gemspec b/owl-bot-staging/google-iam-credentials/google-iam-credentials.gemspec new file mode 100644 index 000000000000..f8994a44c337 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/google-iam-credentials.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/iam/credentials/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-iam-credentials" + gem.version = Google::Iam::Credentials::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens." + gem.summary = "API Client library for the IAM Service Account Credentials API" + gem.homepage = "https://github.com/googleapis/google-cloud-ruby" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-iam-credentials-v1", ">= 0.8", "< 2.a" +end diff --git a/owl-bot-staging/google-iam-credentials/lib/google-iam-credentials.rb b/owl-bot-staging/google-iam-credentials/lib/google-iam-credentials.rb new file mode 100644 index 000000000000..ed890c65691b --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/lib/google-iam-credentials.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "google/iam/credentials" unless defined? Google::Iam::Credentials::VERSION diff --git a/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials.rb b/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials.rb new file mode 100644 index 000000000000..11146d0fb630 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials.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 this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/iam/credentials/version" + +require "googleauth" + +module Google + module Iam + module Credentials + ## + # Create a new client object for IAMCredentials. + # + # By default, this returns an instance of + # [Google::Iam::Credentials::V1::IAMCredentials::Client](https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest/Google-Iam-Credentials-V1-IAMCredentials-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the IAMCredentials service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the IAMCredentials service. + # You can determine whether the method will succeed by calling + # {Google::Iam::Credentials.iam_credentials_available?}. + # + # ## About IAMCredentials + # + # A service account is a special type of Google account that belongs to your + # application or a virtual machine (VM), instead of to an individual end user. + # Your application assumes the identity of the service account to call Google + # APIs, so that the users aren't directly involved. + # + # Service account credentials are used to temporarily assume the identity + # of the service account. Supported credential types include OAuth 2.0 access + # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and + # more. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.iam_credentials version: :v1, transport: :grpc, &block + require "google/iam/credentials/#{version.to_s.downcase}" + + package_name = Google::Iam::Credentials + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Iam::Credentials.const_get(package_name).const_get(:IAMCredentials) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the IAMCredentials service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Iam::Credentials.iam_credentials}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the IAMCredentials service, + # or if the versioned client gem needs an update to support the IAMCredentials service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.iam_credentials_available? version: :v1, transport: :grpc + require "google/iam/credentials/#{version.to_s.downcase}" + package_name = Google::Iam::Credentials + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Iam::Credentials.const_get package_name + return false unless service_module.const_defined? :IAMCredentials + service_module = service_module.const_get :IAMCredentials + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + end + end +end + +helper_path = ::File.join __dir__, "credentials", "helpers.rb" +require "google/iam/credentials/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials/version.rb b/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials/version.rb new file mode 100644 index 000000000000..9bd60071616c --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials/version.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + + +module Google + module Iam + module Credentials + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/client_test.rb b/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/client_test.rb new file mode 100644 index 000000000000..09ee233f11a4 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/iam/credentials" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Iam::Credentials::ClientConstructionMinitest < Minitest::Test + class DummyStub + def endpoint + "endpoint.example.com" + end + + def universe_domain + "example.com" + end + + def stub_logger + nil + end + + def logger + nil + end + end + + def test_iam_credentials_grpc + skip unless Google::Iam::Credentials.iam_credentials_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Iam::Credentials.iam_credentials transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Iam::Credentials::V1::IAMCredentials::Client, client + end + end + + def test_iam_credentials_rest + skip unless Google::Iam::Credentials.iam_credentials_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Iam::Credentials.iam_credentials transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Iam::Credentials::V1::IAMCredentials::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/version_test.rb b/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/version_test.rb new file mode 100644 index 000000000000..571cc4089cac --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/version_test.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "helper" +require "google/iam/credentials/version" + +class Google::Iam::Credentials::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Iam::Credentials::VERSION + end +end diff --git a/owl-bot-staging/google-iam-credentials/test/helper.rb b/owl-bot-staging/google-iam-credentials/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-iam-credentials/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From 4a5bba28f9598dbfa54ddf2826f7d6ce646f8fb9 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 5 Jan 2026 22:35:53 +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-vmware_engine/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-vmware_engine/.rubocop.yml | 39 - .../google-cloud-vmware_engine/.toys.rb | 28 - .../google-cloud-vmware_engine/.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../google-cloud-vmware_engine/CHANGELOG.md | 2 - .../google-cloud-vmware_engine/Gemfile | 28 - .../google-cloud-vmware_engine/LICENSE.md | 201 -- .../google-cloud-vmware_engine/README.md | 142 - .../google-cloud-vmware_engine/Rakefile | 169 -- .../google-cloud-vmware_engine.gemspec | 27 - .../lib/google-cloud-vmware_engine.rb | 19 - .../lib/google/cloud/vmware_engine.rb | 156 - .../lib/google/cloud/vmware_engine/version.rb | 26 - .../google/cloud/vmware_engine/client_test.rb | 64 - .../cloud/vmware_engine/version_test.rb | 26 - .../google-cloud-vmware_engine/test/helper.rb | 25 - .../google-cloud-vpc_access-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-vpc_access-v1/.rubocop.yml | 33 - .../google-cloud-vpc_access-v1/.toys.rb | 28 - .../google-cloud-vpc_access-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-vpc_access-v1/CHANGELOG.md | 2 - .../google-cloud-vpc_access-v1/Gemfile | 11 - .../google-cloud-vpc_access-v1/LICENSE.md | 201 -- .../google-cloud-vpc_access-v1/README.md | 154 - .../google-cloud-vpc_access-v1/Rakefile | 169 -- .../gapic_metadata.json | 38 - .../google-cloud-vpc_access-v1.gemspec | 29 - .../lib/google-cloud-vpc_access-v1.rb | 21 - .../lib/google/cloud/vpc_access/v1.rb | 45 - .../cloud/vpc_access/v1/bindings_override.rb | 64 - .../lib/google/cloud/vpc_access/v1/rest.rb | 38 - .../lib/google/cloud/vpc_access/v1/version.rb | 28 - .../cloud/vpc_access/v1/vpc_access_service.rb | 58 - .../v1/vpc_access_service/client.rb | 830 ------ .../v1/vpc_access_service/credentials.rb | 51 - .../v1/vpc_access_service/operations.rb | 841 ------ .../vpc_access/v1/vpc_access_service/paths.rb | 69 - .../vpc_access/v1/vpc_access_service/rest.rb | 56 - .../v1/vpc_access_service/rest/client.rb | 767 ----- .../v1/vpc_access_service/rest/operations.rb | 925 ------ .../vpc_access_service/rest/service_stub.rb | 326 --- .../cloud/vpcaccess/v1/vpc_access_pb.rb | 58 - .../vpcaccess/v1/vpc_access_services_pb.rb | 55 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/cloud/vpcaccess/v1/vpc_access.rb | 185 -- .../google/longrunning/operations.rb | 191 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...et_metadata_google.cloud.vpcaccess.v1.json | 175 -- .../vpc_access_service/create_connector.rb | 54 - .../vpc_access_service/delete_connector.rb | 54 - .../vpc_access_service/get_connector.rb | 47 - .../vpc_access_service/list_connectors.rb | 51 - .../v1/vpc_access_service_operations_test.rb | 400 --- .../v1/vpc_access_service_paths_test.rb | 67 - .../v1/vpc_access_service_rest_test.rb | 319 -- .../vpc_access/v1/vpc_access_service_test.rb | 373 --- .../google-cloud-vpc_access-v1/test/helper.rb | 25 - .../google-cloud-vpc_access/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-vpc_access/.rubocop.yml | 39 - .../google-cloud-vpc_access/.toys.rb | 28 - .../google-cloud-vpc_access/.yardopts | 11 - .../google-cloud-vpc_access/AUTHENTICATION.md | 122 - .../google-cloud-vpc_access/CHANGELOG.md | 2 - .../google-cloud-vpc_access/Gemfile | 28 - .../google-cloud-vpc_access/LICENSE.md | 201 -- .../google-cloud-vpc_access/README.md | 142 - .../google-cloud-vpc_access/Rakefile | 169 -- .../google-cloud-vpc_access.gemspec | 27 - .../lib/google-cloud-vpc_access.rb | 19 - .../lib/google/cloud/vpc_access.rb | 158 - .../lib/google/cloud/vpc_access/version.rb | 26 - .../google/cloud/vpc_access/client_test.rb | 64 - .../google/cloud/vpc_access/version_test.rb | 26 - .../google-cloud-vpc_access/test/helper.rb | 25 - .../google-cloud-web_risk-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-web_risk-v1/.rubocop.yml | 33 - .../google-cloud-web_risk-v1/.toys.rb | 28 - .../google-cloud-web_risk-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-web_risk-v1/CHANGELOG.md | 2 - .../google-cloud-web_risk-v1/Gemfile | 11 - .../google-cloud-web_risk-v1/LICENSE.md | 201 -- .../google-cloud-web_risk-v1/README.md | 154 - .../google-cloud-web_risk-v1/Rakefile | 169 -- .../gapic_metadata.json | 43 - .../google-cloud-web_risk-v1.gemspec | 28 - .../lib/google-cloud-web_risk-v1.rb | 21 - .../lib/google/cloud/web_risk/v1.rb | 45 - .../lib/google/cloud/web_risk/v1/rest.rb | 37 - .../lib/google/cloud/web_risk/v1/version.rb | 28 - .../cloud/web_risk/v1/web_risk_service.rb | 57 - .../web_risk/v1/web_risk_service/client.rb | 916 ------ .../v1/web_risk_service/credentials.rb | 51 - .../v1/web_risk_service/operations.rb | 841 ------ .../web_risk/v1/web_risk_service/paths.rb | 47 - .../web_risk/v1/web_risk_service/rest.rb | 54 - .../v1/web_risk_service/rest/client.rb | 862 ------ .../v1/web_risk_service/rest/operations.rb | 925 ------ .../v1/web_risk_service/rest/service_stub.rb | 382 --- .../lib/google/cloud/webrisk/v1/webrisk_pb.rb | 80 - .../cloud/webrisk/v1/webrisk_services_pb.rb | 82 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/cloud/webrisk/v1/webrisk.rb | 528 ---- .../google/longrunning/operations.rb | 191 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../google-cloud-web_risk-v1/snippets/Gemfile | 32 - ...ppet_metadata_google.cloud.webrisk.v1.json | 215 -- .../compute_threat_list_diff.rb | 47 - .../web_risk_service/create_submission.rb | 47 - .../web_risk_service/search_hashes.rb | 47 - .../snippets/web_risk_service/search_uris.rb | 47 - .../snippets/web_risk_service/submit_uri.rb | 54 - .../v1/web_risk_service_operations_test.rb | 400 --- .../v1/web_risk_service_paths_test.rb | 55 - .../web_risk/v1/web_risk_service_rest_test.rb | 377 --- .../web_risk/v1/web_risk_service_test.rb | 429 --- .../google-cloud-web_risk-v1/test/helper.rb | 25 - .../google-cloud-web_risk-v1beta1/.gitignore | 22 - .../.repo-metadata.json | 19 - .../.rubocop.yml | 33 - .../google-cloud-web_risk-v1beta1/.toys.rb | 28 - .../google-cloud-web_risk-v1beta1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-web_risk-v1beta1/Gemfile | 11 - .../google-cloud-web_risk-v1beta1/LICENSE.md | 201 -- .../google-cloud-web_risk-v1beta1/README.md | 154 - .../google-cloud-web_risk-v1beta1/Rakefile | 169 -- .../gapic_metadata.json | 33 - .../google-cloud-web_risk-v1beta1.gemspec | 28 - .../lib/google-cloud-web_risk-v1beta1.rb | 21 - .../lib/google/cloud/web_risk/v1beta1.rb | 45 - .../lib/google/cloud/web_risk/v1beta1/rest.rb | 37 - .../google/cloud/web_risk/v1beta1/version.rb | 28 - .../web_risk/v1beta1/web_risk_service.rb | 55 - .../v1beta1/web_risk_service/client.rb | 662 ----- .../v1beta1/web_risk_service/credentials.rb | 51 - .../web_risk/v1beta1/web_risk_service/rest.rb | 52 - .../v1beta1/web_risk_service/rest/client.rb | 622 ---- .../web_risk_service/rest/service_stub.rb | 258 -- .../cloud/webrisk/v1beta1/webrisk_pb.rb | 65 - .../webrisk/v1beta1/webrisk_services_pb.rb | 55 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/cloud/webrisk/v1beta1/webrisk.rb | 307 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../snippets/Gemfile | 32 - ...metadata_google.cloud.webrisk.v1beta1.json | 135 - .../compute_threat_list_diff.rb | 47 - .../web_risk_service/search_hashes.rb | 47 - .../snippets/web_risk_service/search_uris.rb | 47 - .../v1beta1/web_risk_service_rest_test.rb | 265 -- .../web_risk/v1beta1/web_risk_service_test.rb | 286 -- .../test/helper.rb | 25 - .../google-cloud-web_risk/.gitignore | 22 - .../google-cloud-web_risk/.repo-metadata.json | 18 - .../google-cloud-web_risk/.rubocop.yml | 39 - .../google-cloud-web_risk/.toys.rb | 28 - .../google-cloud-web_risk/.yardopts | 11 - .../google-cloud-web_risk/AUTHENTICATION.md | 122 - .../google-cloud-web_risk/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-web_risk/Gemfile | 28 - .../google-cloud-web_risk/LICENSE.md | 201 -- .../google-cloud-web_risk/README.md | 142 - .../google-cloud-web_risk/Rakefile | 169 -- .../google-cloud-web_risk.gemspec | 27 - .../lib/google-cloud-web_risk.rb | 19 - .../lib/google/cloud/web_risk.rb | 157 - .../lib/google/cloud/web_risk/version.rb | 26 - .../test/google/cloud/web_risk/client_test.rb | 64 - .../google/cloud/web_risk/version_test.rb | 26 - .../google-cloud-web_risk/test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 -- .../gapic_metadata.json | 83 - ...ogle-cloud-web_security_scanner-v1.gemspec | 28 - .../google-cloud-web_security_scanner-v1.rb | 21 - .../google/cloud/web_security_scanner/v1.rb | 45 - .../cloud/web_security_scanner/v1/rest.rb | 37 - .../cloud/web_security_scanner/v1/version.rb | 28 - .../v1/web_security_scanner.rb | 56 - .../v1/web_security_scanner/client.rb | 1719 ----------- .../v1/web_security_scanner/credentials.rb | 51 - .../v1/web_security_scanner/rest.rb | 53 - .../v1/web_security_scanner/rest/client.rb | 1585 ---------- .../web_security_scanner/rest/service_stub.rb | 878 ------ .../websecurityscanner/v1/crawled_url_pb.rb | 42 - .../websecurityscanner/v1/finding_addon_pb.rb | 51 - .../cloud/websecurityscanner/v1/finding_pb.rb | 48 - .../v1/finding_type_stats_pb.rb | 42 - .../v1/scan_config_error_pb.rb | 43 - .../websecurityscanner/v1/scan_config_pb.rb | 55 - .../v1/scan_run_error_trace_pb.rb | 46 - .../websecurityscanner/v1/scan_run_log_pb.rb | 46 - .../websecurityscanner/v1/scan_run_pb.rb | 51 - .../v1/scan_run_warning_trace_pb.rb | 43 - .../v1/web_security_scanner_pb.rb | 75 - .../v1/web_security_scanner_services_pb.rb | 72 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../websecurityscanner/v1/crawled_url.rb | 44 - .../cloud/websecurityscanner/v1/finding.rb | 117 - .../websecurityscanner/v1/finding_addon.rb | 191 -- .../v1/finding_type_stats.rb | 39 - .../websecurityscanner/v1/scan_config.rb | 211 -- .../v1/scan_config_error.rb | 191 -- .../cloud/websecurityscanner/v1/scan_run.rb | 110 - .../v1/scan_run_error_trace.rb | 77 - .../websecurityscanner/v1/scan_run_log.rb | 56 - .../v1/scan_run_warning_trace.rb | 65 - .../v1/web_security_scanner.rb | 278 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../snippets/Gemfile | 32 - ...ta_google.cloud.websecurityscanner.v1.json | 535 ---- .../create_scan_config.rb | 47 - .../delete_scan_config.rb | 47 - .../web_security_scanner/get_finding.rb | 47 - .../web_security_scanner/get_scan_config.rb | 47 - .../web_security_scanner/get_scan_run.rb | 47 - .../web_security_scanner/list_crawled_urls.rb | 51 - .../list_finding_type_stats.rb | 47 - .../web_security_scanner/list_findings.rb | 51 - .../web_security_scanner/list_scan_configs.rb | 51 - .../web_security_scanner/list_scan_runs.rb | 51 - .../web_security_scanner/start_scan_run.rb | 47 - .../web_security_scanner/stop_scan_run.rb | 47 - .../update_scan_config.rb | 47 - .../v1/web_security_scanner_rest_test.rb | 812 ------ .../v1/web_security_scanner_test.rb | 900 ------ .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 -- .../gapic_metadata.json | 83 - ...-cloud-web_security_scanner-v1beta.gemspec | 28 - ...oogle-cloud-web_security_scanner-v1beta.rb | 21 - .../cloud/web_security_scanner/v1beta.rb | 45 - .../cloud/web_security_scanner/v1beta/rest.rb | 37 - .../web_security_scanner/v1beta/version.rb | 28 - .../v1beta/web_security_scanner.rb | 57 - .../v1beta/web_security_scanner/client.rb | 1721 ----------- .../web_security_scanner/credentials.rb | 51 - .../v1beta/web_security_scanner/paths.rb | 104 - .../v1beta/web_security_scanner/rest.rb | 54 - .../web_security_scanner/rest/client.rb | 1587 ---------- .../web_security_scanner/rest/service_stub.rb | 878 ------ .../v1beta/crawled_url_pb.rb | 42 - .../v1beta/finding_addon_pb.rb | 48 - .../websecurityscanner/v1beta/finding_pb.rb | 46 - .../v1beta/finding_type_stats_pb.rb | 42 - .../v1beta/scan_config_error_pb.rb | 43 - .../v1beta/scan_config_pb.rb | 57 - .../v1beta/scan_run_error_trace_pb.rb | 46 - .../websecurityscanner/v1beta/scan_run_pb.rb | 52 - .../v1beta/scan_run_warning_trace_pb.rb | 43 - .../v1beta/web_security_scanner_pb.rb | 77 - .../web_security_scanner_services_pb.rb | 73 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../websecurityscanner/v1beta/crawled_url.rb | 44 - .../websecurityscanner/v1beta/finding.rb | 93 - .../v1beta/finding_addon.rb | 111 - .../v1beta/finding_type_stats.rb | 39 - .../websecurityscanner/v1beta/scan_config.rb | 192 -- .../v1beta/scan_config_error.rb | 191 -- .../websecurityscanner/v1beta/scan_run.rb | 110 - .../v1beta/scan_run_error_trace.rb | 77 - .../v1beta/scan_run_warning_trace.rb | 62 - .../v1beta/web_security_scanner.rb | 278 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../snippets/Gemfile | 32 - ...oogle.cloud.websecurityscanner.v1beta.json | 535 ---- .../create_scan_config.rb | 47 - .../delete_scan_config.rb | 47 - .../web_security_scanner/get_finding.rb | 47 - .../web_security_scanner/get_scan_config.rb | 47 - .../web_security_scanner/get_scan_run.rb | 47 - .../web_security_scanner/list_crawled_urls.rb | 51 - .../list_finding_type_stats.rb | 47 - .../web_security_scanner/list_findings.rb | 51 - .../web_security_scanner/list_scan_configs.rb | 51 - .../web_security_scanner/list_scan_runs.rb | 51 - .../web_security_scanner/start_scan_run.rb | 47 - .../web_security_scanner/stop_scan_run.rb | 47 - .../update_scan_config.rb | 47 - .../v1beta/web_security_scanner_paths_test.rb | 91 - .../v1beta/web_security_scanner_rest_test.rb | 812 ------ .../v1beta/web_security_scanner_test.rb | 900 ------ .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-web_security_scanner/Gemfile | 28 - .../LICENSE.md | 201 -- .../README.md | 142 - .../Rakefile | 169 -- .../google-cloud-web_security_scanner.gemspec | 27 - .../lib/google-cloud-web_security_scanner.rb | 19 - .../lib/google/cloud/web_security_scanner.rb | 158 - .../cloud/web_security_scanner/version.rb | 26 - .../cloud/web_security_scanner/client_test.rb | 64 - .../web_security_scanner/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 -- .../gapic_metadata.json | 38 - ...ogle-cloud-workflows-executions-v1.gemspec | 28 - .../google-cloud-workflows-executions-v1.rb | 21 - .../google/cloud/workflows/executions/v1.rb | 47 - .../workflows/executions/v1/executions.rb | 58 - .../executions/v1/executions/client.rb | 802 ----- .../executions/v1/executions/credentials.rb | 53 - .../executions/v1/executions/paths.rb | 75 - .../executions/v1/executions/rest.rb | 55 - .../executions/v1/executions/rest/client.rb | 731 ----- .../v1/executions/rest/service_stub.rb | 329 --- .../workflows/executions/v1/executions_pb.rb | 69 - .../executions/v1/executions_services_pb.rb | 57 - .../cloud/workflows/executions/v1/rest.rb | 39 - .../cloud/workflows/executions/v1/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../workflows/executions/v1/executions.rb | 369 --- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../snippets/Gemfile | 32 - .../snippets/executions/cancel_execution.rb | 47 - .../snippets/executions/create_execution.rb | 47 - .../snippets/executions/get_execution.rb | 47 - .../snippets/executions/list_executions.rb | 51 - ..._google.cloud.workflows.executions.v1.json | 175 -- .../executions/v1/executions_paths_test.rb | 67 - .../executions/v1/executions_rest_test.rb | 322 -- .../executions/v1/executions_test.rb | 355 --- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 -- .../README.md | 154 - .../Rakefile | 169 -- .../gapic_metadata.json | 38 - ...-cloud-workflows-executions-v1beta.gemspec | 28 - ...oogle-cloud-workflows-executions-v1beta.rb | 21 - .../cloud/workflows/executions/v1beta.rb | 42 - .../workflows/executions/v1beta/executions.rb | 52 - .../executions/v1beta/executions/client.rb | 789 ----- .../v1beta/executions/credentials.rb | 53 - .../executions/v1beta/executions/paths.rb | 75 - .../executions/v1beta/executions_pb.rb | 59 - .../v1beta/executions_services_pb.rb | 57 - .../workflows/executions/v1beta/version.rb | 30 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../workflows/executions/v1beta/executions.rb | 200 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../snippets/Gemfile | 32 - .../snippets/executions/cancel_execution.rb | 47 - .../snippets/executions/create_execution.rb | 47 - .../snippets/executions/get_execution.rb | 47 - .../snippets/executions/list_executions.rb | 51 - ...gle.cloud.workflows.executions.v1beta.json | 175 -- .../v1beta/executions_paths_test.rb | 67 - .../executions/v1beta/executions_test.rb | 351 --- .../test/helper.rb | 25 - .../google-cloud-workflows-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-workflows-v1/.rubocop.yml | 33 - .../google-cloud-workflows-v1/.toys.rb | 28 - .../google-cloud-workflows-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-workflows-v1/CHANGELOG.md | 2 - .../google-cloud-workflows-v1/Gemfile | 11 - .../google-cloud-workflows-v1/LICENSE.md | 201 -- .../google-cloud-workflows-v1/README.md | 154 - .../google-cloud-workflows-v1/Rakefile | 169 -- .../gapic_metadata.json | 48 - .../google-cloud-workflows-v1.gemspec | 29 - .../lib/google-cloud-workflows-v1.rb | 21 - .../lib/google/cloud/workflows/v1.rb | 45 - .../cloud/workflows/v1/bindings_override.rb | 75 - .../lib/google/cloud/workflows/v1/rest.rb | 38 - .../lib/google/cloud/workflows/v1/version.rb | 28 - .../google/cloud/workflows/v1/workflows.rb | 58 - .../cloud/workflows/v1/workflows/client.rb | 1074 ------- .../workflows/v1/workflows/credentials.rb | 51 - .../workflows/v1/workflows/operations.rb | 841 ------ .../cloud/workflows/v1/workflows/paths.rb | 113 - .../cloud/workflows/v1/workflows/rest.rb | 56 - .../workflows/v1/workflows/rest/client.rb | 997 ------- .../workflows/v1/workflows/rest/operations.rb | 925 ------ .../v1/workflows/rest/service_stub.rb | 449 --- .../google/cloud/workflows/v1/workflows_pb.rb | 67 - .../workflows/v1/workflows_services_pb.rb | 66 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/cloud/workflows/v1/workflows.rb | 424 --- .../google/longrunning/operations.rb | 191 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...et_metadata_google.cloud.workflows.v1.json | 255 -- .../snippets/workflows/create_workflow.rb | 54 - .../snippets/workflows/delete_workflow.rb | 54 - .../snippets/workflows/get_workflow.rb | 47 - .../workflows/list_workflow_revisions.rb | 51 - .../snippets/workflows/list_workflows.rb | 51 - .../snippets/workflows/update_workflow.rb | 54 - .../workflows/v1/workflows_operations_test.rb | 400 --- .../workflows/v1/workflows_paths_test.rb | 91 - .../cloud/workflows/v1/workflows_rest_test.rb | 433 --- .../cloud/workflows/v1/workflows_test.rb | 511 ---- .../google-cloud-workflows-v1/test/helper.rb | 25 - .../google-cloud-workflows-v1beta/.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-workflows-v1beta/.toys.rb | 28 - .../google-cloud-workflows-v1beta/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-workflows-v1beta/Gemfile | 11 - .../google-cloud-workflows-v1beta/LICENSE.md | 201 -- .../google-cloud-workflows-v1beta/README.md | 154 - .../google-cloud-workflows-v1beta/Rakefile | 169 -- .../gapic_metadata.json | 43 - .../google-cloud-workflows-v1beta.gemspec | 29 - .../lib/google-cloud-workflows-v1beta.rb | 21 - .../lib/google/cloud/workflows/v1beta.rb | 45 - .../workflows/v1beta/bindings_override.rb | 75 - .../lib/google/cloud/workflows/v1beta/rest.rb | 38 - .../google/cloud/workflows/v1beta/version.rb | 28 - .../cloud/workflows/v1beta/workflows.rb | 58 - .../workflows/v1beta/workflows/client.rb | 952 ------ .../workflows/v1beta/workflows/credentials.rb | 51 - .../workflows/v1beta/workflows/operations.rb | 841 ------ .../cloud/workflows/v1beta/workflows/paths.rb | 69 - .../cloud/workflows/v1beta/workflows/rest.rb | 56 - .../workflows/v1beta/workflows/rest/client.rb | 882 ------ .../v1beta/workflows/rest/operations.rb | 925 ------ .../v1beta/workflows/rest/service_stub.rb | 388 --- .../cloud/workflows/v1beta/workflows_pb.rb | 61 - .../workflows/v1beta/workflows_services_pb.rb | 64 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/workflows/v1beta/workflows.rb | 245 -- .../google/longrunning/operations.rb | 191 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - ...etadata_google.cloud.workflows.v1beta.json | 215 -- .../snippets/workflows/create_workflow.rb | 54 - .../snippets/workflows/delete_workflow.rb | 54 - .../snippets/workflows/get_workflow.rb | 47 - .../snippets/workflows/list_workflows.rb | 51 - .../snippets/workflows/update_workflow.rb | 54 - .../v1beta/workflows_operations_test.rb | 400 --- .../workflows/v1beta/workflows_paths_test.rb | 67 - .../workflows/v1beta/workflows_rest_test.rb | 376 --- .../cloud/workflows/v1beta/workflows_test.rb | 442 --- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-workflows-executions/Gemfile | 28 - .../LICENSE.md | 201 -- .../README.md | 142 - .../Rakefile | 169 -- .../google-cloud-workflows-executions.gemspec | 27 - .../lib/google-cloud-workflows-executions.rb | 19 - .../lib/google/cloud/workflows/executions.rb | 150 - .../cloud/workflows/executions/version.rb | 28 - .../cloud/workflows/executions/client_test.rb | 53 - .../workflows/executions/version_test.rb | 26 - .../test/helper.rb | 25 - .../google-cloud-workflows/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-workflows/.rubocop.yml | 39 - .../google-cloud-workflows/.toys.rb | 28 - .../google-cloud-workflows/.yardopts | 11 - .../google-cloud-workflows/AUTHENTICATION.md | 122 - .../google-cloud-workflows/CHANGELOG.md | 2 - .../google-cloud-workflows/Gemfile | 28 - .../google-cloud-workflows/LICENSE.md | 201 -- .../google-cloud-workflows/README.md | 142 - .../google-cloud-workflows/Rakefile | 169 -- .../google-cloud-workflows.gemspec | 27 - .../lib/google-cloud-workflows.rb | 19 - .../lib/google/cloud/workflows.rb | 158 - .../lib/google/cloud/workflows/version.rb | 26 - .../google/cloud/workflows/client_test.rb | 64 - .../google/cloud/workflows/version_test.rb | 26 - .../google-cloud-workflows/test/helper.rb | 25 - .../google-cloud-workstations-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-workstations-v1/.rubocop.yml | 33 - .../google-cloud-workstations-v1/.toys.rb | 28 - .../google-cloud-workstations-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-workstations-v1/CHANGELOG.md | 2 - .../google-cloud-workstations-v1/Gemfile | 11 - .../google-cloud-workstations-v1/LICENSE.md | 201 -- .../google-cloud-workstations-v1/README.md | 153 - .../google-cloud-workstations-v1/Rakefile | 169 -- .../gapic_metadata.json | 118 - .../google-cloud-workstations-v1.gemspec | 30 - .../lib/google-cloud-workstations-v1.rb | 21 - .../lib/google/cloud/workstations/v1.rb | 45 - .../workstations/v1/bindings_override.rb | 110 - .../lib/google/cloud/workstations/v1/rest.rb | 38 - .../google/cloud/workstations/v1/version.rb | 28 - .../cloud/workstations/v1/workstations.rb | 56 - .../workstations/v1/workstations/client.rb | 2595 ----------------- .../v1/workstations/credentials.rb | 47 - .../v1/workstations/operations.rb | 841 ------ .../workstations/v1/workstations/paths.rb | 113 - .../workstations/v1/workstations/rest.rb | 54 - .../v1/workstations/rest/client.rb | 2420 --------------- .../v1/workstations/rest/operations.rb | 925 ------ .../v1/workstations/rest/service_stub.rb | 1310 --------- .../cloud/workstations/v1/workstations_pb.rb | 97 - .../v1/workstations_services_pb.rb | 86 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/workstations/v1/workstations.rb | 1177 -------- .../google/longrunning/operations.rb | 191 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - ...metadata_google.cloud.workstations.v1.json | 815 ------ .../workstations/create_workstation.rb | 54 - .../create_workstation_cluster.rb | 54 - .../workstations/create_workstation_config.rb | 54 - .../workstations/delete_workstation.rb | 54 - .../delete_workstation_cluster.rb | 54 - .../workstations/delete_workstation_config.rb | 54 - .../workstations/generate_access_token.rb | 47 - .../snippets/workstations/get_workstation.rb | 47 - .../workstations/get_workstation_cluster.rb | 47 - .../workstations/get_workstation_config.rb | 47 - .../list_usable_workstation_configs.rb | 51 - .../workstations/list_usable_workstations.rb | 51 - .../workstations/list_workstation_clusters.rb | 51 - .../workstations/list_workstation_configs.rb | 51 - .../workstations/list_workstations.rb | 51 - .../workstations/start_workstation.rb | 54 - .../snippets/workstations/stop_workstation.rb | 54 - .../workstations/update_workstation.rb | 54 - .../update_workstation_cluster.rb | 54 - .../workstations/update_workstation_config.rb | 54 - .../v1/workstations_operations_test.rb | 400 --- .../v1/workstations_paths_test.rb | 91 - .../workstations/v1/workstations_rest_test.rb | 1220 -------- .../workstations/v1/workstations_test.rb | 1441 --------- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../google-cloud-workstations-v1beta/.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-workstations-v1beta/Gemfile | 11 - .../LICENSE.md | 201 -- .../README.md | 153 - .../google-cloud-workstations-v1beta/Rakefile | 169 -- .../gapic_metadata.json | 118 - .../google-cloud-workstations-v1beta.gemspec | 30 - .../lib/google-cloud-workstations-v1beta.rb | 21 - .../lib/google/cloud/workstations/v1beta.rb | 45 - .../workstations/v1beta/bindings_override.rb | 110 - .../google/cloud/workstations/v1beta/rest.rb | 38 - .../cloud/workstations/v1beta/version.rb | 28 - .../cloud/workstations/v1beta/workstations.rb | 56 - .../v1beta/workstations/client.rb | 2595 ----------------- .../v1beta/workstations/credentials.rb | 47 - .../v1beta/workstations/operations.rb | 841 ------ .../workstations/v1beta/workstations/paths.rb | 113 - .../workstations/v1beta/workstations/rest.rb | 54 - .../v1beta/workstations/rest/client.rb | 2420 --------------- .../v1beta/workstations/rest/operations.rb | 925 ------ .../v1beta/workstations/rest/service_stub.rb | 1310 --------- .../workstations/v1beta/workstations_pb.rb | 100 - .../v1beta/workstations_services_pb.rb | 86 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../cloud/workstations/v1beta/workstations.rb | 1265 -------- .../google/longrunning/operations.rb | 191 -- .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/empty.rb | 34 - .../proto_docs/google/protobuf/field_mask.rb | 229 -- .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - ...data_google.cloud.workstations.v1beta.json | 815 ------ .../workstations/create_workstation.rb | 54 - .../create_workstation_cluster.rb | 54 - .../workstations/create_workstation_config.rb | 54 - .../workstations/delete_workstation.rb | 54 - .../delete_workstation_cluster.rb | 54 - .../workstations/delete_workstation_config.rb | 54 - .../workstations/generate_access_token.rb | 47 - .../snippets/workstations/get_workstation.rb | 47 - .../workstations/get_workstation_cluster.rb | 47 - .../workstations/get_workstation_config.rb | 47 - .../list_usable_workstation_configs.rb | 51 - .../workstations/list_usable_workstations.rb | 51 - .../workstations/list_workstation_clusters.rb | 51 - .../workstations/list_workstation_configs.rb | 51 - .../workstations/list_workstations.rb | 51 - .../workstations/start_workstation.rb | 54 - .../snippets/workstations/stop_workstation.rb | 54 - .../workstations/update_workstation.rb | 54 - .../update_workstation_cluster.rb | 54 - .../workstations/update_workstation_config.rb | 54 - .../v1beta/workstations_operations_test.rb | 400 --- .../v1beta/workstations_paths_test.rb | 91 - .../v1beta/workstations_rest_test.rb | 1220 -------- .../workstations/v1beta/workstations_test.rb | 1441 --------- .../test/helper.rb | 25 - .../google-cloud-workstations/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-workstations/.rubocop.yml | 39 - .../google-cloud-workstations/.toys.rb | 28 - .../google-cloud-workstations/.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../google-cloud-workstations/CHANGELOG.md | 2 - .../google-cloud-workstations/Gemfile | 28 - .../google-cloud-workstations/LICENSE.md | 201 -- .../google-cloud-workstations/README.md | 141 - .../google-cloud-workstations/Rakefile | 169 -- .../google-cloud-workstations.gemspec | 27 - .../lib/google-cloud-workstations.rb | 19 - .../lib/google/cloud/workstations.rb | 156 - .../lib/google/cloud/workstations/version.rb | 26 - .../google/cloud/workstations/client_test.rb | 64 - .../google/cloud/workstations/version_test.rb | 26 - .../google-cloud-workstations/test/helper.rb | 25 - owl-bot-staging/google-iam-client/.gitignore | 22 - .../google-iam-client/.repo-metadata.json | 17 - .../google-iam-client/.rubocop.yml | 39 - owl-bot-staging/google-iam-client/.toys.rb | 28 - owl-bot-staging/google-iam-client/.yardopts | 11 - .../google-iam-client/AUTHENTICATION.md | 122 - .../google-iam-client/CHANGELOG.md | 2 - owl-bot-staging/google-iam-client/Gemfile | 28 - owl-bot-staging/google-iam-client/LICENSE.md | 201 -- owl-bot-staging/google-iam-client/README.md | 142 - owl-bot-staging/google-iam-client/Rakefile | 169 -- .../google-iam-client/google-iam.gemspec | 27 - .../google-iam-client/lib/google-iam.rb | 19 - .../google-iam-client/lib/google/iam.rb | 102 - .../lib/google/iam/version.rb | 24 - .../test/google/iam/client_test.rb | 64 - .../test/google/iam/version_test.rb | 26 - .../google-iam-client/test/helper.rb | 25 - .../google-iam-credentials-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-iam-credentials-v1/.rubocop.yml | 33 - .../google-iam-credentials-v1/.toys.rb | 28 - .../google-iam-credentials-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-iam-credentials-v1/CHANGELOG.md | 2 - .../google-iam-credentials-v1/Gemfile | 11 - .../google-iam-credentials-v1/LICENSE.md | 201 -- .../google-iam-credentials-v1/README.md | 154 - .../google-iam-credentials-v1/Rakefile | 169 -- .../gapic_metadata.json | 38 - .../google-iam-credentials-v1.gemspec | 28 - .../lib/google-iam-credentials-v1.rb | 21 - .../lib/google/iam/credentials/v1.rb | 45 - .../google/iam/credentials/v1/common_pb.rb | 56 - .../iam/credentials/v1/iam_credentials.rb | 63 - .../credentials/v1/iam_credentials/client.rb | 854 ------ .../v1/iam_credentials/credentials.rb | 51 - .../credentials/v1/iam_credentials/paths.rb | 50 - .../credentials/v1/iam_credentials/rest.rb | 60 - .../v1/iam_credentials/rest/client.rb | 783 ----- .../v1/iam_credentials/rest/service_stub.rb | 329 --- .../iam/credentials/v1/iamcredentials_pb.rb | 45 - .../v1/iamcredentials_services_pb.rb | 59 - .../lib/google/iam/credentials/v1/rest.rb | 37 - .../lib/google/iam/credentials/v1/version.rb | 28 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 --- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 -- .../google/iam/credentials/v1/common.rb | 186 -- .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../snippets/Gemfile | 32 - .../iam_credentials/generate_access_token.rb | 47 - .../iam_credentials/generate_id_token.rb | 47 - .../snippets/iam_credentials/sign_blob.rb | 47 - .../snippets/iam_credentials/sign_jwt.rb | 47 - ...et_metadata_google.iam.credentials.v1.json | 175 -- .../v1/iam_credentials_paths_test.rb | 55 - .../v1/iam_credentials_rest_test.rb | 325 --- .../credentials/v1/iam_credentials_test.rb | 356 --- .../google-iam-credentials-v1/test/helper.rb | 25 - .../google-iam-credentials/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-iam-credentials/.rubocop.yml | 39 - .../google-iam-credentials/.toys.rb | 28 - .../google-iam-credentials/.yardopts | 11 - .../google-iam-credentials/AUTHENTICATION.md | 122 - .../google-iam-credentials/CHANGELOG.md | 2 - .../google-iam-credentials/Gemfile | 28 - .../google-iam-credentials/LICENSE.md | 201 -- .../google-iam-credentials/README.md | 142 - .../google-iam-credentials/Rakefile | 169 -- .../google-iam-credentials.gemspec | 27 - .../lib/google-iam-credentials.rb | 19 - .../lib/google/iam/credentials.rb | 112 - .../lib/google/iam/credentials/version.rb | 26 - .../google/iam/credentials/client_test.rb | 64 - .../google/iam/credentials/version_test.rb | 26 - .../google-iam-credentials/test/helper.rb | 25 - 830 files changed, 126200 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/.gitignore delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/.yardopts delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/Gemfile delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/README.md delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/Rakefile delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/google-cloud-vmware_engine.gemspec delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/lib/google-cloud-vmware_engine.rb delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine.rb delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine/version.rb delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-vmware_engine/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/google-cloud-vpc_access-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google-cloud-vpc_access-v1.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/cloud/vpcaccess/v1/vpc_access.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/snippet_metadata_google.cloud.vpcaccess.v1.json delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/create_connector.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/delete_connector.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/get_connector.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/list_connectors.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access/.gitignore delete mode 100644 owl-bot-staging/google-cloud-vpc_access/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-vpc_access/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-vpc_access/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access/.yardopts delete mode 100644 owl-bot-staging/google-cloud-vpc_access/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-vpc_access/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-vpc_access/Gemfile delete mode 100644 owl-bot-staging/google-cloud-vpc_access/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-vpc_access/README.md delete mode 100644 owl-bot-staging/google-cloud-vpc_access/Rakefile delete mode 100644 owl-bot-staging/google-cloud-vpc_access/google-cloud-vpc_access.gemspec delete mode 100644 owl-bot-staging/google-cloud-vpc_access/lib/google-cloud-vpc_access.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access/version.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-vpc_access/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/google-cloud-web_risk-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google-cloud-web_risk-v1.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/cloud/webrisk/v1/webrisk.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/snippet_metadata_google.cloud.webrisk.v1.json delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/compute_threat_list_diff.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/create_submission.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_hashes.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_uris.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/submit_uri.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/google-cloud-web_risk-v1beta1.gemspec delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google-cloud-web_risk-v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/version.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/cloud/webrisk/v1beta1/webrisk.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/snippet_metadata_google.cloud.webrisk.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/compute_threat_list_diff.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_hashes.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_uris.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk-v1beta1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk/.gitignore delete mode 100644 owl-bot-staging/google-cloud-web_risk/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_risk/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-web_risk/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk/.yardopts delete mode 100644 owl-bot-staging/google-cloud-web_risk/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-web_risk/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-web_risk/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_risk/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-web_risk/README.md delete mode 100644 owl-bot-staging/google-cloud-web_risk/Rakefile delete mode 100644 owl-bot-staging/google-cloud-web_risk/google-cloud-web_risk.gemspec delete mode 100644 owl-bot-staging/google-cloud-web_risk/lib/google-cloud-web_risk.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_risk/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/google-cloud-web_security_scanner-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google-cloud-web_security_scanner-v1.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/crawled_url_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_addon_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_type_stats_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_error_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_error_trace_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_log_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/crawled_url.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_addon.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_type_stats.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config_error.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_error_trace.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_log.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_warning_trace.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/web_security_scanner.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/snippet_metadata_google.cloud.websecurityscanner.v1.json delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/create_scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/delete_scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_finding.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_run.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_crawled_urls.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_finding_type_stats.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_findings.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_configs.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_runs.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/start_scan_run.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/stop_scan_run.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/update_scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/google-cloud-web_security_scanner-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/snippet_metadata_google.cloud.websecurityscanner.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.gitignore delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/.yardopts delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/Gemfile delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/README.md delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/Rakefile delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/google-cloud-web_security_scanner.gemspec delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/lib/google-cloud-web_security_scanner.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner/version.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-web_security_scanner/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/google-cloud-workflows-executions-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/snippets/snippet_metadata_google.cloud.workflows.executions.v1.json delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/google-cloud-workflows-executions-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/snippet_metadata_google.cloud.workflows.executions.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/google-cloud-workflows-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/snippet_metadata_google.cloud.workflows.v1.json delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/google-cloud-workflows-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/snippet_metadata_google.cloud.workflows.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/google-cloud-workflows-executions.gemspec delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google-cloud-workflows-executions.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions/version.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/README.md delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/google-cloud-workflows.gemspec delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google-cloud-workflows.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows/version.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/google-cloud-workstations-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/README.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/google-cloud-workstations-v1beta.gemspec delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-workstations/.gitignore delete mode 100644 owl-bot-staging/google-cloud-workstations/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-workstations/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-workstations/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-workstations/.yardopts delete mode 100644 owl-bot-staging/google-cloud-workstations/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-workstations/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-workstations/Gemfile delete mode 100644 owl-bot-staging/google-cloud-workstations/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-workstations/README.md delete mode 100644 owl-bot-staging/google-cloud-workstations/Rakefile delete mode 100644 owl-bot-staging/google-cloud-workstations/google-cloud-workstations.gemspec delete mode 100644 owl-bot-staging/google-cloud-workstations/lib/google-cloud-workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations.rb delete mode 100644 owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations/version.rb delete mode 100644 owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-workstations/test/helper.rb delete mode 100644 owl-bot-staging/google-iam-client/.gitignore delete mode 100644 owl-bot-staging/google-iam-client/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-client/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-client/.toys.rb delete mode 100644 owl-bot-staging/google-iam-client/.yardopts delete mode 100644 owl-bot-staging/google-iam-client/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-client/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-client/Gemfile delete mode 100644 owl-bot-staging/google-iam-client/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-client/README.md delete mode 100644 owl-bot-staging/google-iam-client/Rakefile delete mode 100644 owl-bot-staging/google-iam-client/google-iam.gemspec delete mode 100644 owl-bot-staging/google-iam-client/lib/google-iam.rb delete mode 100644 owl-bot-staging/google-iam-client/lib/google/iam.rb delete mode 100644 owl-bot-staging/google-iam-client/lib/google/iam/version.rb delete mode 100644 owl-bot-staging/google-iam-client/test/google/iam/client_test.rb delete mode 100644 owl-bot-staging/google-iam-client/test/google/iam/version_test.rb delete mode 100644 owl-bot-staging/google-iam-client/test/helper.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/.gitignore delete mode 100644 owl-bot-staging/google-iam-credentials-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-credentials-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-credentials-v1/.toys.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/.yardopts delete mode 100644 owl-bot-staging/google-iam-credentials-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-credentials-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-credentials-v1/Gemfile delete mode 100644 owl-bot-staging/google-iam-credentials-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-credentials-v1/README.md delete mode 100644 owl-bot-staging/google-iam-credentials-v1/Rakefile delete mode 100644 owl-bot-staging/google-iam-credentials-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-iam-credentials-v1/google-iam-credentials-v1.gemspec delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/version.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/snippets/snippet_metadata_google.iam.credentials.v1.json delete mode 100644 owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb delete mode 100644 owl-bot-staging/google-iam-credentials-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-iam-credentials/.gitignore delete mode 100644 owl-bot-staging/google-iam-credentials/.repo-metadata.json delete mode 100644 owl-bot-staging/google-iam-credentials/.rubocop.yml delete mode 100644 owl-bot-staging/google-iam-credentials/.toys.rb delete mode 100644 owl-bot-staging/google-iam-credentials/.yardopts delete mode 100644 owl-bot-staging/google-iam-credentials/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-iam-credentials/CHANGELOG.md delete mode 100644 owl-bot-staging/google-iam-credentials/Gemfile delete mode 100644 owl-bot-staging/google-iam-credentials/LICENSE.md delete mode 100644 owl-bot-staging/google-iam-credentials/README.md delete mode 100644 owl-bot-staging/google-iam-credentials/Rakefile delete mode 100644 owl-bot-staging/google-iam-credentials/google-iam-credentials.gemspec delete mode 100644 owl-bot-staging/google-iam-credentials/lib/google-iam-credentials.rb delete mode 100644 owl-bot-staging/google-iam-credentials/lib/google/iam/credentials.rb delete mode 100644 owl-bot-staging/google-iam-credentials/lib/google/iam/credentials/version.rb delete mode 100644 owl-bot-staging/google-iam-credentials/test/google/iam/credentials/client_test.rb delete mode 100644 owl-bot-staging/google-iam-credentials/test/google/iam/credentials/version_test.rb delete mode 100644 owl-bot-staging/google-iam-credentials/test/helper.rb diff --git a/owl-bot-staging/google-cloud-vmware_engine/.gitignore b/owl-bot-staging/google-cloud-vmware_engine/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-vmware_engine/.repo-metadata.json b/owl-bot-staging/google-cloud-vmware_engine/.repo-metadata.json deleted file mode 100644 index de963dcd4fec..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "vmwareengine.googleapis.com", - "api_shortname": "vmwareengine", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine/latest", - "distribution_name": "google-cloud-vmware_engine", - "is_cloud": true, - "language": "ruby", - "name": "vmwareengine", - "name_pretty": "Google Cloud VMware Engine API", - "product_documentation": "https://cloud.google.com/vmware-engine/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Google Cloud VMware Engine is a fully managed service that lets you run the VMware platform in Google Cloud. VMware Engine provides you with VMware operational continuity so you can benefit from a cloud consumption model and lower your total cost of ownership. VMware Engine also offers on-demand provisioning, pay-as-you-grow, and capacity optimization.", - "ruby-cloud-product-url": "https://cloud.google.com/vmware-engine/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-vmware_engine/.rubocop.yml b/owl-bot-staging/google-cloud-vmware_engine/.rubocop.yml deleted file mode 100644 index d12092f1da92..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-vmware_engine.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-cloud-vmware_engine.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-vmware_engine/.toys.rb b/owl-bot-staging/google-cloud-vmware_engine/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-cloud-vmware_engine/.yardopts b/owl-bot-staging/google-cloud-vmware_engine/.yardopts deleted file mode 100644 index 024cf705516a..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Google Cloud VMware Engine API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-vmware_engine/AUTHENTICATION.md b/owl-bot-staging/google-cloud-vmware_engine/AUTHENTICATION.md deleted file mode 100644 index 374984db0f3a..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-vmware_engine library is to use -[Application Default Credentials (ADC)](https://cloud.google.com/docs/authentication/application-default-credentials). -To review all of your authentication options, see [Credentials lookup](#credential-lookup). - -## Quickstart - -The following example shows how to set up authentication for a local development -environment with your user credentials. - -**NOTE:** This method is _not_ recommended for running in production. User credentials -should be used only during development. - -1. [Download and install the Google Cloud CLI](https://cloud.google.com/sdk). -2. Set up a local ADC file with your user credentials: - -```sh -gcloud auth application-default login -``` - -3. Write code as if already authenticated. - -For more information about setting up authentication for a local development environment, see -[Set up Application Default Credentials](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-dev). - -## Credential Lookup - -The google-cloud-vmware_engine library provides several mechanisms to configure your system. -Generally, using Application Default Credentials to facilitate automatic -credentials discovery is the easist method. But if you need to explicitly specify -credentials, there are several methods available to you. - -Credentials are accepted in the following ways, in the following order or precedence: - -1. Credentials specified in method arguments -2. Credentials specified in configuration -3. Credentials pointed to or included in environment variables -4. Credentials found in local ADC file -5. Credentials returned by the metadata server for the attached service account (GCP) - -### Configuration - -You can configure a path to a JSON credentials file, either for an individual client object or -globally, for all client objects. The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -To configure a credentials file for an individual client initialization: - -```ruby -require "google/cloud/vmware_engine" - -client = Google::Cloud::VmwareEngine.vmware_engine do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/vmware_engine" - -Google::Cloud::VmwareEngine.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::VmwareEngine.vmware_engine -``` - -### 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-vmware_engine -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/cloud/vmware_engine" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::VmwareEngine.vmware_engine -``` - -### 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-vmware_engine/CHANGELOG.md b/owl-bot-staging/google-cloud-vmware_engine/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-vmware_engine/Gemfile b/owl-bot-staging/google-cloud-vmware_engine/Gemfile deleted file mode 100644 index af087997847e..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-vmware_engine-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-vmware_engine.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-vmware_engine/LICENSE.md b/owl-bot-staging/google-cloud-vmware_engine/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-cloud-vmware_engine/README.md b/owl-bot-staging/google-cloud-vmware_engine/README.md deleted file mode 100644 index d5633c7d9ac1..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Google Cloud VMware Engine API - -API Client library for the Google Cloud VMware Engine API - -Google Cloud VMware Engine is a fully managed service that lets you run the VMware platform in Google Cloud. VMware Engine provides you with VMware operational continuity so you can benefit from a cloud consumption model and lower your total cost of ownership. VMware Engine also offers on-demand provisioning, pay-as-you-grow, and capacity optimization. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-vmware_engine-v*`. -The gem `google-cloud-vmware_engine` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine/latest) -for this library, google-cloud-vmware_engine, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-vmware_engine-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/vmware-engine/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-vmware_engine -``` - -In order to use this library, you first need to go through the following steps: - -1. [Select or create a Cloud Platform project.](https://console.cloud.google.com/project) -1. [Enable billing for your project.](https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project) -1. [Enable the API.](https://console.cloud.google.com/apis/library/vmwareengine.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/vmware_engine" - -client = Google::Cloud::VmwareEngine.vmware_engine -request = ::Google::Cloud::VmwareEngine::V1::ListPrivateCloudsRequest.new # (request fields as keyword arguments...) -response = client.list_private_clouds request -``` - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-vmware_engine-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-vmware_engine`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-vmware_engine-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-vmware_engine`. -The main client is recommended because it will embody the best practices for -accessing the service, and may also provide more convenient interfaces or -tighter integration into frameworks and third-party libraries. In addition, the -documentation and samples published by Google will generally demonstrate use of -the main client. - -### Why would I want to use a versioned client? - -You can use a versioned client if you are content with a possibly lower-level -class interface, you explicitly want to avoid features provided by the main -client, or you want to access a specific service version not be covered by the -main client. You can identify versioned client gems because the service version -is part of the name, e.g. `google-cloud-vmware_engine-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-vmware_engine/Rakefile b/owl-bot-staging/google-cloud-vmware_engine/Rakefile deleted file mode 100644 index 7c56d29df96b..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-vmware_engine 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/vmware_engine/v1/vmware_engine/credentials" - ::Google::Cloud::VmwareEngine::V1::VmwareEngine::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-vmware_engine gem has no acceptance tests." - end - end - - desc "Run acceptance cleanup." - task :cleanup do - end -end - -task :samples do - Rake::Task["samples:latest"].invoke -end - -namespace :samples do - task :latest do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "not_master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-vmware_engine gem has no samples to test." - end - end - - task :master do - if File.directory? "samples" - Dir.chdir "samples" do - Bundler.with_clean_env do - ENV["GOOGLE_CLOUD_SAMPLES_TEST"] = "master" - sh "bundle update" - sh "bundle exec rake test" - end - end - else - puts "The google-cloud-vmware_engine gem has no samples to test." - end - end -end - -require "yard" -require "yard/rake/yardoc_task" -YARD::Rake::YardocTask.new do |y| - y.options << "--fail-on-warning" -end - -desc "Run yard-doctest example tests." -task :doctest do - puts "The google-cloud-vmware_engine gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-vmware_engine" - header "google-cloud-vmware_engine rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-vmware_engine yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-vmware_engine test", "*" - Rake::Task[:test].invoke -end - -namespace :ci do - desc "Run the CI build, with smoke tests." - task :smoke_test do - Rake::Task[:ci].invoke - header "google-cloud-vmware_engine smoke_test", "*" - Rake::Task[:smoke_test].invoke - end - desc "Run the CI build, with acceptance tests." - task :acceptance do - Rake::Task[:ci].invoke - header "google-cloud-vmware_engine acceptance", "*" - Rake::Task[:acceptance].invoke - end - task :a do - # This is a handy shortcut to save typing - Rake::Task["ci:acceptance"].invoke - end -end - -task default: :test - -def header str, token = "#" - line_length = str.length + 8 - puts "" - puts token * line_length - puts "#{token * 3} #{str} #{token * 3}" - puts token * line_length - puts "" -end diff --git a/owl-bot-staging/google-cloud-vmware_engine/google-cloud-vmware_engine.gemspec b/owl-bot-staging/google-cloud-vmware_engine/google-cloud-vmware_engine.gemspec deleted file mode 100644 index 42944bd6bf89..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/google-cloud-vmware_engine.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/vmware_engine/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-vmware_engine" - gem.version = Google::Cloud::VmwareEngine::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Google Cloud VMware Engine is a fully managed service that lets you run the VMware platform in Google Cloud. VMware Engine provides you with VMware operational continuity so you can benefit from a cloud consumption model and lower your total cost of ownership. VMware Engine also offers on-demand provisioning, pay-as-you-grow, and capacity optimization." - gem.summary = "API Client library for the Google Cloud VMware Engine API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-vmware_engine-v1", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-vmware_engine/lib/google-cloud-vmware_engine.rb b/owl-bot-staging/google-cloud-vmware_engine/lib/google-cloud-vmware_engine.rb deleted file mode 100644 index b45dc8640fac..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/lib/google-cloud-vmware_engine.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/vmware_engine" unless defined? Google::Cloud::VmwareEngine::VERSION diff --git a/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine.rb b/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine.rb deleted file mode 100644 index 6d195fb23f8e..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine.rb +++ /dev/null @@ -1,156 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/vmware_engine/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :vmware_engine do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module VmwareEngine - ## - # Create a new client object for VmwareEngine. - # - # By default, this returns an instance of - # [Google::Cloud::VmwareEngine::V1::VmwareEngine::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-vmware_engine-v1/latest/Google-Cloud-VmwareEngine-V1-VmwareEngine-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the VmwareEngine service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the VmwareEngine service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::VmwareEngine.vmware_engine_available?}. - # - # ## About VmwareEngine - # - # VMwareEngine manages VMware's private clusters in the Cloud. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.vmware_engine version: :v1, transport: :grpc, &block - require "google/cloud/vmware_engine/#{version.to_s.downcase}" - - package_name = Google::Cloud::VmwareEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::VmwareEngine.const_get(package_name).const_get(:VmwareEngine) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the VmwareEngine service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::VmwareEngine.vmware_engine}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the VmwareEngine service, - # or if the versioned client gem needs an update to support the VmwareEngine service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.vmware_engine_available? version: :v1, transport: :grpc - require "google/cloud/vmware_engine/#{version.to_s.downcase}" - package_name = Google::Cloud::VmwareEngine - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::VmwareEngine.const_get package_name - return false unless service_module.const_defined? :VmwareEngine - service_module = service_module.const_get :VmwareEngine - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-vmware_engine library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.vmware_engine if block_given? - - ::Google::Cloud.configure.vmware_engine - end - end - end -end - -helper_path = ::File.join __dir__, "vmware_engine", "helpers.rb" -require "google/cloud/vmware_engine/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine/version.rb b/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine/version.rb deleted file mode 100644 index 8883c81155ce..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/lib/google/cloud/vmware_engine/version.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module VmwareEngine - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/client_test.rb b/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/client_test.rb deleted file mode 100644 index cf4b478d36cf..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/vmware_engine" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::VmwareEngine::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_vmware_engine_grpc - skip unless Google::Cloud::VmwareEngine.vmware_engine_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::VmwareEngine.vmware_engine transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::VmwareEngine::V1::VmwareEngine::Client, client - end - end - - def test_vmware_engine_rest - skip unless Google::Cloud::VmwareEngine.vmware_engine_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::VmwareEngine.vmware_engine transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::VmwareEngine::V1::VmwareEngine::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/version_test.rb b/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/version_test.rb deleted file mode 100644 index fc85dc11ef19..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/test/google/cloud/vmware_engine/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/vmware_engine/version" - -class Google::Cloud::VmwareEngine::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::VmwareEngine::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-vmware_engine/test/helper.rb b/owl-bot-staging/google-cloud-vmware_engine/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-vmware_engine/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/.gitignore b/owl-bot-staging/google-cloud-vpc_access-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-vpc_access-v1/.repo-metadata.json deleted file mode 100644 index 555203aea0e8..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "vpcaccess.googleapis.com", - "api_shortname": "vpcaccess", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest", - "distribution_name": "google-cloud-vpc_access-v1", - "is_cloud": true, - "language": "ruby", - "name": "vpcaccess", - "name_pretty": "Serverless VPC Access V1 API", - "product_documentation": "https://cloud.google.com/vpc/docs/serverless-vpc-access", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address. Note that google-cloud-vpc_access-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-vpc_access instead. See the readme for more details.", - "ruby-cloud-env-prefix": "VPC_ACCESS", - "ruby-cloud-product-url": "https://cloud.google.com/vpc/docs/serverless-vpc-access", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/.rubocop.yml b/owl-bot-staging/google-cloud-vpc_access-v1/.rubocop.yml deleted file mode 100644 index 5d9ab3a8534f..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-vpc_access-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-vpc_access-v1.rb" diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/.toys.rb b/owl-bot-staging/google-cloud-vpc_access-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/.yardopts b/owl-bot-staging/google-cloud-vpc_access-v1/.yardopts deleted file mode 100644 index 18b7b8796058..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Serverless VPC Access 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-vpc_access-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-vpc_access-v1/AUTHENTICATION.md deleted file mode 100644 index 0a3414fbad29..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-vpc_access-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-vpc_access-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/vpc_access/v1" - -client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/vpc_access/v1" - -::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::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-vpc_access-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/vpc_access/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::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-vpc_access-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-vpc_access-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/Gemfile b/owl-bot-staging/google-cloud-vpc_access-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/LICENSE.md b/owl-bot-staging/google-cloud-vpc_access-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/README.md b/owl-bot-staging/google-cloud-vpc_access-v1/README.md deleted file mode 100644 index f3ab3b89c390..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Serverless VPC Access V1 API - -API for managing VPC access connectors. - -Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Serverless VPC Access V1 API. Most users should consider using -the main client gem, -[google-cloud-vpc_access](https://rubygems.org/gems/google-cloud-vpc_access). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-vpc_access-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/vpcaccess.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/vpc_access/v1" - -client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new -request = ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new # (request fields as keyword arguments...) -response = client.create_connector request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/vpc/docs/serverless-vpc-access) -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/vpc_access/v1" -require "logger" - -client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-vpc_access`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-vpc_access-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-vpc_access`. -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-vpc_access-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-vpc_access-v1/Rakefile b/owl-bot-staging/google-cloud-vpc_access-v1/Rakefile deleted file mode 100644 index e8bc005d5a03..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["VPC_ACCESS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["VPC_ACCESS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["VPC_ACCESS_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 VPC_ACCESS_TEST_PROJECT=test123 VPC_ACCESS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/vpc_access/v1/vpc_access_service/credentials" - ::Google::Cloud::VpcAccess::V1::VpcAccessService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["VPC_ACCESS_PROJECT"] = project - ENV["VPC_ACCESS_TEST_PROJECT"] = project - ENV["VPC_ACCESS_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-vpc_access-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-vpc_access-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-vpc_access-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-vpc_access-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-vpc_access-v1" - header "google-cloud-vpc_access-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-vpc_access-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-vpc_access-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-vpc_access-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-vpc_access-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-vpc_access-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-vpc_access-v1/gapic_metadata.json deleted file mode 100644 index 2dae0b91baaf..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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.vpcaccess.v1", - "libraryPackage": "::Google::Cloud::VpcAccess::V1", - "services": { - "VpcAccessService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client", - "rpcs": { - "CreateConnector": { - "methods": [ - "create_connector" - ] - }, - "GetConnector": { - "methods": [ - "get_connector" - ] - }, - "ListConnectors": { - "methods": [ - "list_connectors" - ] - }, - "DeleteConnector": { - "methods": [ - "delete_connector" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/google-cloud-vpc_access-v1.gemspec b/owl-bot-staging/google-cloud-vpc_access-v1/google-cloud-vpc_access-v1.gemspec deleted file mode 100644 index 93cc867ae5b0..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/google-cloud-vpc_access-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/vpc_access/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-vpc_access-v1" - gem.version = Google::Cloud::VpcAccess::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address. Note that google-cloud-vpc_access-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-vpc_access instead. See the readme for more details." - gem.summary = "API for managing VPC access connectors." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google-cloud-vpc_access-v1.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google-cloud-vpc_access-v1.rb deleted file mode 100644 index dd22501e9404..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google-cloud-vpc_access-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/vpc_access/v1" diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1.rb deleted file mode 100644 index 927136b99d80..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/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/vpc_access/v1/vpc_access_service" -require "google/cloud/vpc_access/v1/version" - -module Google - module Cloud - module VpcAccess - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/vpc_access/v1" - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/vpc_access/v1" - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/vpc_access/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/bindings_override.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/bindings_override.rb deleted file mode 100644 index 3da4e39390e9..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/bindings_override.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module VpcAccess - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/vpc_access/v1/rest" - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "VpcAccess"] - parent_config = while namespace.any? - parent_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.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-vpc_access-v1/lib/google/cloud/vpc_access/v1/rest.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/rest.rb deleted file mode 100644 index 998323ec2725..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/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/vpc_access/v1/vpc_access_service/rest" -require "google/cloud/vpc_access/v1/bindings_override" -require "google/cloud/vpc_access/v1/version" - -module Google - module Cloud - module VpcAccess - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/vpc_access/v1/rest" - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/version.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/version.rb deleted file mode 100644 index 3348f75044ad..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/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 VpcAccess - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service.rb deleted file mode 100644 index b1274c5f41a2..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_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/vpc_access/v1/version" - -require "google/cloud/vpc_access/v1/vpc_access_service/credentials" -require "google/cloud/vpc_access/v1/vpc_access_service/paths" -require "google/cloud/vpc_access/v1/vpc_access_service/operations" -require "google/cloud/vpc_access/v1/vpc_access_service/client" -require "google/cloud/vpc_access/v1/vpc_access_service/rest" - -module Google - module Cloud - module VpcAccess - module V1 - ## - # Serverless VPC Access API allows users to create and manage connectors for - # App Engine, Cloud Functions and Cloud Run to have internal connections to - # Virtual Private Cloud networks. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/vpc_access/v1/vpc_access_service" - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/vpc_access/v1/vpc_access_service/rest" - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - module VpcAccessService - end - end - end - end -end - -helper_path = ::File.join __dir__, "vpc_access_service", "helpers.rb" -require "google/cloud/vpc_access/v1/vpc_access_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/client.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/client.rb deleted file mode 100644 index 3ec4e8d43b00..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/client.rb +++ /dev/null @@ -1,830 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/vpcaccess/v1/vpc_access_pb" -require "google/cloud/location" - -module Google - module Cloud - module VpcAccess - module V1 - module VpcAccessService - ## - # Client for the VpcAccessService service. - # - # Serverless VPC Access API allows users to create and manage connectors for - # App Engine, Cloud Functions and Cloud Run to have internal connections to - # Virtual Private Cloud networks. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vpcaccess.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vpc_access_service_stub - - ## - # Configure the VpcAccessService Client class. - # - # See {::Google::Cloud::VpcAccess::V1::VpcAccessService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VpcAccessService clients - # ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "VpcAccess", "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: [14, 2] - } - - default_config.rpcs.create_connector.timeout = 60.0 - - default_config.rpcs.get_connector.timeout = 60.0 - - default_config.rpcs.list_connectors.timeout = 60.0 - - default_config.rpcs.delete_connector.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VpcAccessService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::VpcAccess::V1::VpcAccessService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @vpc_access_service_stub.universe_domain - end - - ## - # Create a new VpcAccessService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VpcAccessService 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/vpcaccess/v1/vpc_access_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 - - @vpc_access_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::VpcAccess::V1::VpcAccessService::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 - ) - - @vpc_access_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 = @vpc_access_service_stub.endpoint - config.universe_domain = @vpc_access_service_stub.universe_domain - config.logger = @vpc_access_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VpcAccess::V1::VpcAccessService::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 - @vpc_access_service_stub.logger - end - - # Service calls - - ## - # Creates a Serverless VPC Access connector, returns an operation. - # - # @overload create_connector(request, options = nil) - # Pass arguments to `create_connector` via a request object, either of type - # {::Google::Cloud::VpcAccess::V1::CreateConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VpcAccess::V1::CreateConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_connector(parent: nil, connector_id: nil, connector: nil) - # Pass arguments to `create_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 project and location in which the configuration should be created, - # specified in the format `projects/*/locations/*`. - # @param connector_id [::String] - # Required. The ID to use for this connector. - # @param connector [::Google::Cloud::VpcAccess::V1::Connector, ::Hash] - # Required. 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/vpc_access/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new - # - # # Call the create_connector method. - # result = client.create_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_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_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::VpcAccess::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_access_service_stub.call_rpc :create_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 - - ## - # Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource - # does not exist. - # - # @overload get_connector(request, options = nil) - # Pass arguments to `get_connector` via a request object, either of type - # {::Google::Cloud::VpcAccess::V1::GetConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VpcAccess::V1::GetConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_connector(name: nil) - # Pass arguments to `get_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. Name of a Serverless VPC Access connector to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::VpcAccess::V1::Connector] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::VpcAccess::V1::Connector] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vpc_access/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VpcAccess::V1::GetConnectorRequest.new - # - # # Call the get_connector method. - # result = client.get_connector request - # - # # The returned object is of type Google::Cloud::VpcAccess::V1::Connector. - # p result - # - def get_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::GetConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_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::VpcAccess::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_access_service_stub.call_rpc :get_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 - - ## - # Lists Serverless VPC Access connectors. - # - # @overload list_connectors(request, options = nil) - # Pass arguments to `list_connectors` via a request object, either of type - # {::Google::Cloud::VpcAccess::V1::ListConnectorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VpcAccess::V1::ListConnectorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_connectors(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_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 project and location from which the routes should be listed. - # @param page_size [::Integer] - # Maximum number of functions to return per call. - # @param page_token [::String] - # Continuation token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/vpc_access/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new - # - # # Call the list_connectors method. - # result = client.list_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::VpcAccess::V1::Connector. - # p item - # end - # - def list_connectors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_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::VpcAccess::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_connectors.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_connectors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_access_service_stub.call_rpc :list_connectors, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @vpc_access_service_stub, :list_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 - - ## - # Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the - # resource does not exist. - # - # @overload delete_connector(request, options = nil) - # Pass arguments to `delete_connector` via a request object, either of type - # {::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_connector(name: nil) - # Pass arguments to `delete_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. Name of a Serverless VPC Access connector 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/vpc_access/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new - # - # # Call the delete_connector method. - # result = client.delete_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_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_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::VpcAccess::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_connector.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_access_service_stub.call_rpc :delete_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 - - ## - # Configuration class for the VpcAccessService API. - # - # This class represents the configuration for VpcAccessService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::VpcAccess::V1::VpcAccessService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_connector to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_connector.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_connector.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::VpcAccess::V1::VpcAccessService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "vpcaccess.googleapis.com" - - config_attr :endpoint, nil, ::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 VpcAccessService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connector - ## - # RPC-specific configuration for `get_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connector - ## - # RPC-specific configuration for `list_connectors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connectors - ## - # RPC-specific configuration for `delete_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connector - - # @private - def initialize parent_rpcs = nil - create_connector_config = parent_rpcs.create_connector if parent_rpcs.respond_to? :create_connector - @create_connector = ::Gapic::Config::Method.new create_connector_config - get_connector_config = parent_rpcs.get_connector if parent_rpcs.respond_to? :get_connector - @get_connector = ::Gapic::Config::Method.new get_connector_config - list_connectors_config = parent_rpcs.list_connectors if parent_rpcs.respond_to? :list_connectors - @list_connectors = ::Gapic::Config::Method.new list_connectors_config - delete_connector_config = parent_rpcs.delete_connector if parent_rpcs.respond_to? :delete_connector - @delete_connector = ::Gapic::Config::Method.new delete_connector_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/credentials.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/credentials.rb deleted file mode 100644 index cb40b03f48ad..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_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 VpcAccess - module V1 - module VpcAccessService - # Credentials for the VpcAccessService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "VPC_ACCESS_CREDENTIALS", - "VPC_ACCESS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "VPC_ACCESS_CREDENTIALS_JSON", - "VPC_ACCESS_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-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/operations.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/operations.rb deleted file mode 100644 index 0680a1f755d1..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module VpcAccess - module V1 - module VpcAccessService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vpcaccess.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VpcAccessService 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 VpcAccessService 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::VpcAccess::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VpcAccess::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VpcAccess::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::VpcAccess::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::VpcAccess::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "vpcaccess.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/paths.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/paths.rb deleted file mode 100644 index 83b10fa7cd6a..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_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 VpcAccess - module V1 - module VpcAccessService - # Path helper methods for the VpcAccessService API. - module Paths - ## - # Create a fully-qualified Connector resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connectors/{connector}` - # - # @param project [String] - # @param location [String] - # @param connector [String] - # - # @return [::String] - def connector_path project:, location:, 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}/connectors/#{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 diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest.rb deleted file mode 100644 index 4ab07e129b6a..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_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/vpc_access/v1/version" -require "google/cloud/vpc_access/v1/bindings_override" - -require "google/cloud/vpc_access/v1/vpc_access_service/credentials" -require "google/cloud/vpc_access/v1/vpc_access_service/paths" -require "google/cloud/vpc_access/v1/vpc_access_service/rest/operations" -require "google/cloud/vpc_access/v1/vpc_access_service/rest/client" - -module Google - module Cloud - module VpcAccess - module V1 - ## - # Serverless VPC Access API allows users to create and manage connectors for - # App Engine, Cloud Functions and Cloud Run to have internal connections to - # Virtual Private Cloud networks. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/vpc_access/v1/vpc_access_service/rest" - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - module VpcAccessService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/vpc_access/v1/vpc_access_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/client.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/client.rb deleted file mode 100644 index 461527c82fd1..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/client.rb +++ /dev/null @@ -1,767 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/vpcaccess/v1/vpc_access_pb" -require "google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module VpcAccess - module V1 - module VpcAccessService - module Rest - ## - # REST client for the VpcAccessService service. - # - # Serverless VPC Access API allows users to create and manage connectors for - # App Engine, Cloud Functions and Cloud Run to have internal connections to - # Virtual Private Cloud networks. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vpcaccess.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :vpc_access_service_stub - - ## - # Configure the VpcAccessService Client class. - # - # See {::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all VpcAccessService clients - # ::Google::Cloud::VpcAccess::V1::VpcAccessService::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", "VpcAccess", "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: [14, 2] - } - - default_config.rpcs.create_connector.timeout = 60.0 - - default_config.rpcs.get_connector.timeout = 60.0 - - default_config.rpcs.list_connectors.timeout = 60.0 - - default_config.rpcs.delete_connector.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the VpcAccessService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::VpcAccess::V1::VpcAccessService::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 - @vpc_access_service_stub.universe_domain - end - - ## - # Create a new VpcAccessService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the VpcAccessService 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::VpcAccess::V1::VpcAccessService::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 - - @vpc_access_service_stub = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @vpc_access_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 = @vpc_access_service_stub.endpoint - config.universe_domain = @vpc_access_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @vpc_access_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::VpcAccess::V1::VpcAccessService::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 - @vpc_access_service_stub.logger - end - - # Service calls - - ## - # Creates a Serverless VPC Access connector, returns an operation. - # - # @overload create_connector(request, options = nil) - # Pass arguments to `create_connector` via a request object, either of type - # {::Google::Cloud::VpcAccess::V1::CreateConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VpcAccess::V1::CreateConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_connector(parent: nil, connector_id: nil, connector: nil) - # Pass arguments to `create_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 project and location in which the configuration should be created, - # specified in the format `projects/*/locations/*`. - # @param connector_id [::String] - # Required. The ID to use for this connector. - # @param connector [::Google::Cloud::VpcAccess::V1::Connector, ::Hash] - # Required. 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/vpc_access/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new - # - # # Call the create_connector method. - # result = client.create_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_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest - - # Converts hash and nil to an 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_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VpcAccess::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_connector.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_access_service_stub.create_connector request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Serverless VPC Access connector. Returns NOT_FOUND if the resource - # does not exist. - # - # @overload get_connector(request, options = nil) - # Pass arguments to `get_connector` via a request object, either of type - # {::Google::Cloud::VpcAccess::V1::GetConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VpcAccess::V1::GetConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_connector(name: nil) - # Pass arguments to `get_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. Name of a Serverless VPC Access connector to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::VpcAccess::V1::Connector] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::VpcAccess::V1::Connector] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vpc_access/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VpcAccess::V1::GetConnectorRequest.new - # - # # Call the get_connector method. - # result = client.get_connector request - # - # # The returned object is of type Google::Cloud::VpcAccess::V1::Connector. - # p result - # - def get_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::GetConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VpcAccess::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_connector.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_access_service_stub.get_connector request, 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 Serverless VPC Access connectors. - # - # @overload list_connectors(request, options = nil) - # Pass arguments to `list_connectors` via a request object, either of type - # {::Google::Cloud::VpcAccess::V1::ListConnectorsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VpcAccess::V1::ListConnectorsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_connectors(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_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 project and location from which the routes should be listed. - # @param page_size [::Integer] - # Maximum number of functions to return per call. - # @param page_token [::String] - # Continuation token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::VpcAccess::V1::Connector>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/vpc_access/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new - # - # # Call the list_connectors method. - # result = client.list_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::VpcAccess::V1::Connector. - # p item - # end - # - def list_connectors request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_connectors.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VpcAccess::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_connectors.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_connectors.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_access_service_stub.list_connectors request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @vpc_access_service_stub, :list_connectors, "connectors", request, result, 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 Serverless VPC Access connector. Returns NOT_FOUND if the - # resource does not exist. - # - # @overload delete_connector(request, options = nil) - # Pass arguments to `delete_connector` via a request object, either of type - # {::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_connector(name: nil) - # Pass arguments to `delete_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. Name of a Serverless VPC Access connector 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/vpc_access/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new - # - # # Call the delete_connector method. - # result = client.delete_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_connector request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_connector.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::VpcAccess::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_connector.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_connector.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @vpc_access_service_stub.delete_connector request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 VpcAccessService REST API. - # - # This class represents the configuration for VpcAccessService 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::VpcAccess::V1::VpcAccessService::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_connector to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_connector.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_connector.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "vpcaccess.googleapis.com" - - config_attr :endpoint, nil, ::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 VpcAccessService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :create_connector - ## - # RPC-specific configuration for `get_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :get_connector - ## - # RPC-specific configuration for `list_connectors` - # @return [::Gapic::Config::Method] - # - attr_reader :list_connectors - ## - # RPC-specific configuration for `delete_connector` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_connector - - # @private - def initialize parent_rpcs = nil - create_connector_config = parent_rpcs.create_connector if parent_rpcs.respond_to? :create_connector - @create_connector = ::Gapic::Config::Method.new create_connector_config - get_connector_config = parent_rpcs.get_connector if parent_rpcs.respond_to? :get_connector - @get_connector = ::Gapic::Config::Method.new get_connector_config - list_connectors_config = parent_rpcs.list_connectors if parent_rpcs.respond_to? :list_connectors - @list_connectors = ::Gapic::Config::Method.new list_connectors_config - delete_connector_config = parent_rpcs.delete_connector if parent_rpcs.respond_to? :delete_connector - @delete_connector = ::Gapic::Config::Method.new delete_connector_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/operations.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/operations.rb deleted file mode 100644 index 55477e7f6600..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module VpcAccess - module V1 - module VpcAccessService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "vpcaccess.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the VpcAccessService 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 VpcAccessService 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::VpcAccess::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::VpcAccess::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::VpcAccess::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::VpcAccess::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "vpcaccess.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub.rb deleted file mode 100644 index e7aeac787a8c..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpc_access/v1/vpc_access_service/rest/service_stub.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! - -require "google/cloud/vpcaccess/v1/vpc_access_pb" - -module Google - module Cloud - module VpcAccess - module V1 - module VpcAccessService - module Rest - ## - # REST service stub for the VpcAccessService 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_connector REST call - # - # @param request_pb [::Google::Cloud::VpcAccess::V1::CreateConnectorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_connector request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_connector_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_connector", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_connector REST call - # - # @param request_pb [::Google::Cloud::VpcAccess::V1::GetConnectorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::VpcAccess::V1::Connector] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::VpcAccess::V1::Connector] - # A result object deserialized from the server's reply - def get_connector request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_connector_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_connector", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::VpcAccess::V1::Connector.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_connectors REST call - # - # @param request_pb [::Google::Cloud::VpcAccess::V1::ListConnectorsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::VpcAccess::V1::ListConnectorsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::VpcAccess::V1::ListConnectorsResponse] - # A result object deserialized from the server's reply - def list_connectors request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_connectors_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_connectors", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::VpcAccess::V1::ListConnectorsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_connector REST call - # - # @param request_pb [::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_connector request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_connector_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_connector", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the create_connector REST call - # - # @param request_pb [::Google::Cloud::VpcAccess::V1::CreateConnectorRequest] - # 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_connector_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/connectors", - body: "connector", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_connector REST call - # - # @param request_pb [::Google::Cloud::VpcAccess::V1::GetConnectorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_connector_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_connectors REST call - # - # @param request_pb [::Google::Cloud::VpcAccess::V1::ListConnectorsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_connectors_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/connectors", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_connector REST call - # - # @param request_pb [::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_connector_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/connectors/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_pb.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_pb.rb deleted file mode 100644 index 9b4bc81b3537..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/vpcaccess/v1/vpc_access.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/vpcaccess/v1/vpc_access.proto\x12\x19google.cloud.vpcaccess.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\"\xc8\x04\n\tConnector\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07network\x18\x02 \x01(\t\x12\x15\n\rip_cidr_range\x18\x03 \x01(\t\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.cloud.vpcaccess.v1.Connector.StateB\x03\xe0\x41\x03\x12\x16\n\x0emin_throughput\x18\x05 \x01(\x05\x12\x16\n\x0emax_throughput\x18\x06 \x01(\x05\x12\x1f\n\x12\x63onnected_projects\x18\x07 \x03(\tB\x03\xe0\x41\x03\x12;\n\x06subnet\x18\x08 \x01(\x0b\x32+.google.cloud.vpcaccess.v1.Connector.Subnet\x12\x14\n\x0cmachine_type\x18\n \x01(\t\x12\x15\n\rmin_instances\x18\x0b \x01(\x05\x12\x15\n\rmax_instances\x18\x0c \x01(\x05\x1a*\n\x06Subnet\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\"^\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05READY\x10\x01\x12\x0c\n\x08\x43REATING\x10\x02\x12\x0c\n\x08\x44\x45LETING\x10\x03\x12\t\n\x05\x45RROR\x10\x04\x12\x0c\n\x08UPDATING\x10\x05:g\xea\x41\x64\n\"vpcaccess.googleapis.com/Connector\x12>projects/{project}/locations/{location}/connectors/{connector}\"\xac\x01\n\x16\x43reateConnectorRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x19\n\x0c\x63onnector_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12<\n\tconnector\x18\x03 \x01(\x0b\x32$.google.cloud.vpcaccess.v1.ConnectorB\x03\xe0\x41\x02\"O\n\x13GetConnectorRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\"y\n\x15ListConnectorsRequest\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\x16ListConnectorsResponse\x12\x38\n\nconnectors\x18\x01 \x03(\x0b\x32$.google.cloud.vpcaccess.v1.Connector\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"R\n\x16\x44\x65leteConnectorRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\"\xcd\x01\n\x11OperationMetadata\x12\x13\n\x06method\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x06target\x18\x05 \x01(\tB*\xe0\x41\x03\xfa\x41$\n\"vpcaccess.googleapis.com/Connector2\xfc\x06\n\x10VpcAccessService\x12\xe8\x01\n\x0f\x43reateConnector\x12\x31.google.cloud.vpcaccess.v1.CreateConnectorRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41\x1e\n\tConnector\x12\x11OperationMetadata\xda\x41\x1dparent,connector_id,connector\x82\xd3\xe4\x93\x02;\"./v1/{parent=projects/*/locations/*}/connectors:\tconnector\x12\xa3\x01\n\x0cGetConnector\x12..google.cloud.vpcaccess.v1.GetConnectorRequest\x1a$.google.cloud.vpcaccess.v1.Connector\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/locations/*/connectors/*}\x12\xb6\x01\n\x0eListConnectors\x12\x30.google.cloud.vpcaccess.v1.ListConnectorsRequest\x1a\x31.google.cloud.vpcaccess.v1.ListConnectorsResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/locations/*}/connectors\x12\xcf\x01\n\x0f\x44\x65leteConnector\x12\x31.google.cloud.vpcaccess.v1.DeleteConnectorRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1/{name=projects/*/locations/*/connectors/*}\x1aL\xca\x41\x18vpcaccess.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xc5\x01\n\x1d\x63om.google.cloud.vpcaccess.v1B\x0eVpcAccessProtoP\x01Z;cloud.google.com/go/vpcaccess/apiv1/vpcaccesspb;vpcaccesspb\xaa\x02\x19Google.Cloud.VpcAccess.V1\xca\x02\x19Google\\Cloud\\VpcAccess\\V1\xea\x02\x1cGoogle::Cloud::VpcAccess::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module VpcAccess - module V1 - Connector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.Connector").msgclass - Connector::Subnet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.Connector.Subnet").msgclass - Connector::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.Connector.State").enummodule - CreateConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.CreateConnectorRequest").msgclass - GetConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.GetConnectorRequest").msgclass - ListConnectorsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.ListConnectorsRequest").msgclass - ListConnectorsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.ListConnectorsResponse").msgclass - DeleteConnectorRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.DeleteConnectorRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.vpcaccess.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_services_pb.rb b/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_services_pb.rb deleted file mode 100644 index f53da11be9ff..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/lib/google/cloud/vpcaccess/v1/vpc_access_services_pb.rb +++ /dev/null @@ -1,55 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/vpcaccess/v1/vpc_access.proto for package 'Google.Cloud.VpcAccess.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/vpcaccess/v1/vpc_access_pb' - -module Google - module Cloud - module VpcAccess - module V1 - module VpcAccessService - # Serverless VPC Access API allows users to create and manage connectors for - # App Engine, Cloud Functions and Cloud Run to have internal connections to - # Virtual Private Cloud networks. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.vpcaccess.v1.VpcAccessService' - - # Creates a Serverless VPC Access connector, returns an operation. - rpc :CreateConnector, ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest, ::Google::Longrunning::Operation - # Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource - # does not exist. - rpc :GetConnector, ::Google::Cloud::VpcAccess::V1::GetConnectorRequest, ::Google::Cloud::VpcAccess::V1::Connector - # Lists Serverless VPC Access connectors. - rpc :ListConnectors, ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest, ::Google::Cloud::VpcAccess::V1::ListConnectorsResponse - # Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the - # resource does not exist. - rpc :DeleteConnector, ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/README.md deleted file mode 100644 index 9bc43f1e670f..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Serverless VPC Access 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-vpc_access-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/cloud/vpcaccess/v1/vpc_access.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/cloud/vpcaccess/v1/vpc_access.rb deleted file mode 100644 index c0249c575e05..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/cloud/vpcaccess/v1/vpc_access.rb +++ /dev/null @@ -1,185 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module VpcAccess - module V1 - # Definition of a Serverless VPC Access connector. - # @!attribute [rw] name - # @return [::String] - # The resource name in the format `projects/*/locations/*/connectors/*`. - # @!attribute [rw] network - # @return [::String] - # Name of a VPC network. - # @!attribute [rw] ip_cidr_range - # @return [::String] - # The range of internal addresses that follows RFC 4632 notation. - # Example: `10.132.0.0/28`. - # @!attribute [r] state - # @return [::Google::Cloud::VpcAccess::V1::Connector::State] - # Output only. State of the VPC access connector. - # @!attribute [rw] min_throughput - # @return [::Integer] - # Minimum throughput of the connector in Mbps. Default and min is 200. - # @!attribute [rw] max_throughput - # @return [::Integer] - # Maximum throughput of the connector in Mbps. Default is 300, max is 1000. - # @!attribute [r] connected_projects - # @return [::Array<::String>] - # Output only. List of projects using the connector. - # @!attribute [rw] subnet - # @return [::Google::Cloud::VpcAccess::V1::Connector::Subnet] - # The subnet in which to house the VPC Access Connector. - # @!attribute [rw] machine_type - # @return [::String] - # Machine type of VM Instance underlying connector. Default is e2-micro - # @!attribute [rw] min_instances - # @return [::Integer] - # Minimum value of instances in autoscaling group underlying the connector. - # @!attribute [rw] max_instances - # @return [::Integer] - # Maximum value of instances in autoscaling group underlying the connector. - class Connector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The subnet in which to house the connector - # @!attribute [rw] name - # @return [::String] - # Subnet name (relative, not fully qualified). - # E.g. if the full subnet selfLink is - # https://compute.googleapis.com/compute/v1/projects/\\{project}/regions/\\{region}/subnetworks/\\{subnetName} - # the correct input for this field would be \\{subnetName} - # @!attribute [rw] project_id - # @return [::String] - # Project in which the subnet exists. - # If not set, this project is assumed to be the project for which - # the connector create request was issued. - class Subnet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State of a connector. - module State - # Invalid state. - STATE_UNSPECIFIED = 0 - - # Connector is deployed and ready to receive traffic. - READY = 1 - - # An Insert operation is in progress. Transient condition. - CREATING = 2 - - # A Delete operation is in progress. Transient condition. - DELETING = 3 - - # Connector is in a bad state, manual deletion recommended. - ERROR = 4 - - # The connector is being updated. - UPDATING = 5 - end - end - - # Request for creating a Serverless VPC Access connector. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location in which the configuration should be created, - # specified in the format `projects/*/locations/*`. - # @!attribute [rw] connector_id - # @return [::String] - # Required. The ID to use for this connector. - # @!attribute [rw] connector - # @return [::Google::Cloud::VpcAccess::V1::Connector] - # Required. Resource to create. - class CreateConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for getting a Serverless VPC Access connector. - # @!attribute [rw] name - # @return [::String] - # Required. Name of a Serverless VPC Access connector to get. - class GetConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for listing Serverless VPC Access connectors in a location. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the routes should be listed. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of functions to return per call. - # @!attribute [rw] page_token - # @return [::String] - # Continuation token. - class ListConnectorsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for listing Serverless VPC Access connectors. - # @!attribute [rw] connectors - # @return [::Array<::Google::Cloud::VpcAccess::V1::Connector>] - # List of Serverless VPC Access connectors. - # @!attribute [rw] next_page_token - # @return [::String] - # Continuation token. - class ListConnectorsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a Serverless VPC Access connector. - # @!attribute [rw] name - # @return [::String] - # Required. Name of a Serverless VPC Access connector to delete. - class DeleteConnectorRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for google.longrunning.Operation. - # @!attribute [r] method - # @return [::String] - # Output only. Method that initiated the operation e.g. - # google.cloud.vpcaccess.v1.Connectors.CreateConnector. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the operation completed. - # @!attribute [r] target - # @return [::String] - # Output only. Name of the resource that this operation is acting on e.g. - # projects/my-project/locations/us-central1/connectors/v1. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-vpc_access-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/Gemfile deleted file mode 100644 index 2797ddedd3b9..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-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-vpc_access-v1", path: "../" -else - gem "google-cloud-vpc_access-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-vpc_access-v1/snippets/snippet_metadata_google.cloud.vpcaccess.v1.json b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/snippet_metadata_google.cloud.vpcaccess.v1.json deleted file mode 100644 index fe9e53321b02..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/snippet_metadata_google.cloud.vpcaccess.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-vpc_access-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.vpcaccess.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync", - "title": "Snippet for the create_connector call in the VpcAccessService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VpcAccess::V1::VpcAccessService::Client#create_connector.", - "file": "vpc_access_service/create_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_connector", - "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client#create_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VpcAccess::V1::CreateConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VpcAccessService::Client", - "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client" - }, - "method": { - "short_name": "CreateConnector", - "full_name": "google.cloud.vpcaccess.v1.VpcAccessService.CreateConnector", - "service": { - "short_name": "VpcAccessService", - "full_name": "google.cloud.vpcaccess.v1.VpcAccessService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "vpcaccess_v1_generated_VpcAccessService_GetConnector_sync", - "title": "Snippet for the get_connector call in the VpcAccessService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VpcAccess::V1::VpcAccessService::Client#get_connector.", - "file": "vpc_access_service/get_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_connector", - "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client#get_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VpcAccess::V1::GetConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::VpcAccess::V1::Connector", - "client": { - "short_name": "VpcAccessService::Client", - "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client" - }, - "method": { - "short_name": "GetConnector", - "full_name": "google.cloud.vpcaccess.v1.VpcAccessService.GetConnector", - "service": { - "short_name": "VpcAccessService", - "full_name": "google.cloud.vpcaccess.v1.VpcAccessService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync", - "title": "Snippet for the list_connectors call in the VpcAccessService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VpcAccess::V1::VpcAccessService::Client#list_connectors.", - "file": "vpc_access_service/list_connectors.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_connectors", - "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client#list_connectors", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VpcAccess::V1::ListConnectorsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::VpcAccess::V1::ListConnectorsResponse", - "client": { - "short_name": "VpcAccessService::Client", - "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client" - }, - "method": { - "short_name": "ListConnectors", - "full_name": "google.cloud.vpcaccess.v1.VpcAccessService.ListConnectors", - "service": { - "short_name": "VpcAccessService", - "full_name": "google.cloud.vpcaccess.v1.VpcAccessService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync", - "title": "Snippet for the delete_connector call in the VpcAccessService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::VpcAccess::V1::VpcAccessService::Client#delete_connector.", - "file": "vpc_access_service/delete_connector.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_connector", - "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client#delete_connector", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "VpcAccessService::Client", - "full_name": "::Google::Cloud::VpcAccess::V1::VpcAccessService::Client" - }, - "method": { - "short_name": "DeleteConnector", - "full_name": "google.cloud.vpcaccess.v1.VpcAccessService.DeleteConnector", - "service": { - "short_name": "VpcAccessService", - "full_name": "google.cloud.vpcaccess.v1.VpcAccessService" - } - } - }, - "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-vpc_access-v1/snippets/vpc_access_service/create_connector.rb b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/create_connector.rb deleted file mode 100644 index 9d4b5a326409..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/create_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 vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync] -require "google/cloud/vpc_access/v1" - -## -# Snippet for the create_connector call in the VpcAccessService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VpcAccess::V1::VpcAccessService::Client#create_connector. -# -def create_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new - - # Call the create_connector method. - result = client.create_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 vpcaccess_v1_generated_VpcAccessService_CreateConnector_sync] diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/delete_connector.rb b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/delete_connector.rb deleted file mode 100644 index 7f7359c63908..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/delete_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 vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync] -require "google/cloud/vpc_access/v1" - -## -# Snippet for the delete_connector call in the VpcAccessService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VpcAccess::V1::VpcAccessService::Client#delete_connector. -# -def delete_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new - - # Call the delete_connector method. - result = client.delete_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 vpcaccess_v1_generated_VpcAccessService_DeleteConnector_sync] diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/get_connector.rb b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/get_connector.rb deleted file mode 100644 index 6f68789450d6..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/get_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 vpcaccess_v1_generated_VpcAccessService_GetConnector_sync] -require "google/cloud/vpc_access/v1" - -## -# Snippet for the get_connector call in the VpcAccessService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VpcAccess::V1::VpcAccessService::Client#get_connector. -# -def get_connector - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::VpcAccess::V1::GetConnectorRequest.new - - # Call the get_connector method. - result = client.get_connector request - - # The returned object is of type Google::Cloud::VpcAccess::V1::Connector. - p result -end -# [END vpcaccess_v1_generated_VpcAccessService_GetConnector_sync] diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/list_connectors.rb b/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/list_connectors.rb deleted file mode 100644 index 0d7049d755ab..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/snippets/vpc_access_service/list_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 vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync] -require "google/cloud/vpc_access/v1" - -## -# Snippet for the list_connectors call in the VpcAccessService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::VpcAccess::V1::VpcAccessService::Client#list_connectors. -# -def list_connectors - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new - - # Call the list_connectors method. - result = client.list_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::VpcAccess::V1::Connector. - p item - end -end -# [END vpcaccess_v1_generated_VpcAccessService_ListConnectors_sync] diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_operations_test.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_operations_test.rb deleted file mode 100644 index 6f68f498f052..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_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/vpcaccess/v1/vpc_access_pb" -require "google/cloud/vpcaccess/v1/vpc_access_services_pb" -require "google/cloud/vpc_access/v1/vpc_access_service" - -class ::Google::Cloud::VpcAccess::V1::VpcAccessService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_paths_test.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_paths_test.rb deleted file mode 100644 index 9ba18e2eb3d5..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_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/vpc_access/v1/vpc_access_service" - -class ::Google::Cloud::VpcAccess::V1::VpcAccessService::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_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::VpcAccess::V1::VpcAccessService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.connector_path project: "value0", location: "value1", connector: "value2" - assert_equal "projects/value0/locations/value1/connectors/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::VpcAccess::V1::VpcAccessService::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-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_rest_test.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_rest_test.rb deleted file mode 100644 index 6b6f716024fe..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_rest_test.rb +++ /dev/null @@ -1,319 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/vpcaccess/v1/vpc_access_pb" -require "google/cloud/vpc_access/v1/vpc_access_service/rest" - - -class ::Google::Cloud::VpcAccess::V1::VpcAccessService::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_connector - # Create test objects. - 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" - connector_id = "hello world" - connector = {} - - create_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.stub :transcode_create_connector_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_connector_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_connector({ parent: parent, connector_id: connector_id, connector: connector }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_connector parent: parent, connector_id: connector_id, connector: connector do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_connector ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new(parent: parent, connector_id: connector_id, connector: connector) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_connector({ parent: parent, connector_id: connector_id, connector: connector }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_connector(::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new(parent: parent, connector_id: connector_id, connector: connector), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_connector_client_stub.call_count - end - end - end - - def test_get_connector - # Create test objects. - client_result = ::Google::Cloud::VpcAccess::V1::Connector.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.stub :transcode_get_connector_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_connector_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_connector({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_connector name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_connector ::Google::Cloud::VpcAccess::V1::GetConnectorRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_connector({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_connector(::Google::Cloud::VpcAccess::V1::GetConnectorRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_connector_client_stub.call_count - end - end - end - - def test_list_connectors - # Create test objects. - client_result = ::Google::Cloud::VpcAccess::V1::ListConnectorsResponse.new - http_response = OpenStruct.new 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_connectors_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.stub :transcode_list_connectors_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_connectors_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_connectors({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_connectors parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_connectors ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_connectors({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_connectors(::Google::Cloud::VpcAccess::V1::ListConnectorsRequest.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_connectors_client_stub.call_count - end - end - end - - def test_delete_connector - # Create test objects. - 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_connector_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::ServiceStub.stub :transcode_delete_connector_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_connector_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_connector({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_connector name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_connector ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_connector({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_connector(::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_connector_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::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_test.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_test.rb deleted file mode 100644 index 2c8083f3cb82..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/test/google/cloud/vpc_access/v1/vpc_access_service_test.rb +++ /dev/null @@ -1,373 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/vpcaccess/v1/vpc_access_pb" -require "google/cloud/vpc_access/v1/vpc_access_service" - -class ::Google::Cloud::VpcAccess::V1::VpcAccessService::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_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" - connector_id = "hello world" - connector = {} - - create_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_connector, name - assert_kind_of ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["connector_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::VpcAccess::V1::Connector), request["connector"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_connector_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_connector({ parent: parent, connector_id: connector_id, connector: connector }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_connector parent: parent, connector_id: connector_id, connector: connector do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_connector ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new(parent: parent, connector_id: connector_id, connector: connector) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_connector({ parent: parent, connector_id: connector_id, connector: connector }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_connector(::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new(parent: parent, connector_id: connector_id, connector: connector), grpc_options) do |response, operation| - assert_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_connector_client_stub.call_rpc_count - end - end - - def test_get_connector - # Create GRPC objects. - grpc_response = ::Google::Cloud::VpcAccess::V1::Connector.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_connector, name - assert_kind_of ::Google::Cloud::VpcAccess::V1::GetConnectorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_connector_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_connector({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_connector name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_connector ::Google::Cloud::VpcAccess::V1::GetConnectorRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_connector({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_connector(::Google::Cloud::VpcAccess::V1::GetConnectorRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_connector_client_stub.call_rpc_count - end - end - - def test_list_connectors - # Create GRPC objects. - grpc_response = ::Google::Cloud::VpcAccess::V1::ListConnectorsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_connectors_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_connectors, name - assert_kind_of ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest, 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_connectors_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_connectors({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_connectors parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_connectors ::Google::Cloud::VpcAccess::V1::ListConnectorsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_connectors({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_connectors(::Google::Cloud::VpcAccess::V1::ListConnectorsRequest.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_connectors_client_stub.call_rpc_count - end - end - - def test_delete_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" - - delete_connector_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_connector, name - assert_kind_of ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_connector_client_stub do - # Create client - client = ::Google::Cloud::VpcAccess::V1::VpcAccessService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_connector({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_connector name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_connector ::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_connector({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_connector(::Google::Cloud::VpcAccess::V1::DeleteConnectorRequest.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_connector_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::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::VpcAccess::V1::VpcAccessService::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::VpcAccess::V1::VpcAccessService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::VpcAccess::V1::VpcAccessService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access-v1/test/helper.rb b/owl-bot-staging/google-cloud-vpc_access-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-vpc_access/.gitignore b/owl-bot-staging/google-cloud-vpc_access/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-vpc_access/.repo-metadata.json b/owl-bot-staging/google-cloud-vpc_access/.repo-metadata.json deleted file mode 100644 index 10e171d05577..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "vpcaccess.googleapis.com", - "api_shortname": "vpcaccess", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access/latest", - "distribution_name": "google-cloud-vpc_access", - "is_cloud": true, - "language": "ruby", - "name": "vpcaccess", - "name_pretty": "Serverless VPC Access API", - "product_documentation": "https://cloud.google.com/vpc/docs/serverless-vpc-access", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address.", - "ruby-cloud-env-prefix": "VPC_ACCESS", - "ruby-cloud-product-url": "https://cloud.google.com/vpc/docs/serverless-vpc-access", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-vpc_access/.rubocop.yml b/owl-bot-staging/google-cloud-vpc_access/.rubocop.yml deleted file mode 100644 index 098b6514bfd0..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-vpc_access.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-cloud-vpc_access.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-vpc_access/.toys.rb b/owl-bot-staging/google-cloud-vpc_access/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/.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-vpc_access/.yardopts b/owl-bot-staging/google-cloud-vpc_access/.yardopts deleted file mode 100644 index 9b25ff10bc5e..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Serverless VPC Access API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-vpc_access/AUTHENTICATION.md b/owl-bot-staging/google-cloud-vpc_access/AUTHENTICATION.md deleted file mode 100644 index 89d9c318560a..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-vpc_access 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-vpc_access 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/vpc_access" - -client = Google::Cloud::VpcAccess.vpc_access_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/vpc_access" - -Google::Cloud::VpcAccess.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::VpcAccess.vpc_access_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-vpc_access -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/vpc_access" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::VpcAccess.vpc_access_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-vpc_access/CHANGELOG.md b/owl-bot-staging/google-cloud-vpc_access/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-vpc_access/Gemfile b/owl-bot-staging/google-cloud-vpc_access/Gemfile deleted file mode 100644 index 236435e43059..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-vpc_access-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-vpc_access.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-vpc_access/LICENSE.md b/owl-bot-staging/google-cloud-vpc_access/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/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-vpc_access/README.md b/owl-bot-staging/google-cloud-vpc_access/README.md deleted file mode 100644 index c0e54c7952f9..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Serverless VPC Access API - -API Client library for the Serverless VPC Access API - -Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-vpc_access-v*`. -The gem `google-cloud-vpc_access` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access/latest) -for this library, google-cloud-vpc_access, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-vpc_access-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/vpc/docs/serverless-vpc-access) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-vpc_access -``` - -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/vpcaccess.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/vpc_access" - -client = Google::Cloud::VpcAccess.vpc_access_service -request = ::Google::Cloud::VpcAccess::V1::CreateConnectorRequest.new # (request fields as keyword arguments...) -response = client.create_connector request -``` - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-vpc_access-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-vpc_access`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-vpc_access-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-vpc_access`. -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-vpc_access-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-vpc_access/Rakefile b/owl-bot-staging/google-cloud-vpc_access/Rakefile deleted file mode 100644 index 29c29a69e937..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-vpc_access acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["VPC_ACCESS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["VPC_ACCESS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["VPC_ACCESS_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 VPC_ACCESS_TEST_PROJECT=test123 VPC_ACCESS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/vpc_access/v1/vpc_access_service/credentials" - ::Google::Cloud::VpcAccess::V1::VpcAccessService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["VPC_ACCESS_PROJECT"] = project - ENV["VPC_ACCESS_TEST_PROJECT"] = project - ENV["VPC_ACCESS_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-vpc_access 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-vpc_access 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-vpc_access 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-vpc_access gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-vpc_access" - header "google-cloud-vpc_access rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-vpc_access yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-vpc_access 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-vpc_access 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-vpc_access 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-vpc_access/google-cloud-vpc_access.gemspec b/owl-bot-staging/google-cloud-vpc_access/google-cloud-vpc_access.gemspec deleted file mode 100644 index 90a578eb3f09..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/google-cloud-vpc_access.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/vpc_access/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-vpc_access" - gem.version = Google::Cloud::VpcAccess::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Serverless VPC Access enables you to connect from a serverless environment on Google Cloud (Cloud Run, Cloud Functions, or the App Engine standard environment) directly to your VPC network. This connection makes it possible for your serverless environment to access Compute Engine VM instances, Memorystore instances, and any other resources with an internal IP address." - gem.summary = "API Client library for the Serverless VPC Access API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-vpc_access-v1", ">= 0.7", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-vpc_access/lib/google-cloud-vpc_access.rb b/owl-bot-staging/google-cloud-vpc_access/lib/google-cloud-vpc_access.rb deleted file mode 100644 index 744a62659de5..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/lib/google-cloud-vpc_access.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/vpc_access" unless defined? Google::Cloud::VpcAccess::VERSION diff --git a/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access.rb b/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access.rb deleted file mode 100644 index 4f089d02bbc4..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/vpc_access/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :vpc_access do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module VpcAccess - ## - # Create a new client object for VpcAccessService. - # - # By default, this returns an instance of - # [Google::Cloud::VpcAccess::V1::VpcAccessService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-vpc_access-v1/latest/Google-Cloud-VpcAccess-V1-VpcAccessService-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the VpcAccessService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the VpcAccessService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::VpcAccess.vpc_access_service_available?}. - # - # ## About VpcAccessService - # - # Serverless VPC Access API allows users to create and manage connectors for - # App Engine, Cloud Functions and Cloud Run to have internal connections to - # Virtual Private Cloud networks. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.vpc_access_service version: :v1, transport: :grpc, &block - require "google/cloud/vpc_access/#{version.to_s.downcase}" - - package_name = Google::Cloud::VpcAccess - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::VpcAccess.const_get(package_name).const_get(:VpcAccessService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the VpcAccessService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::VpcAccess.vpc_access_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the VpcAccessService service, - # or if the versioned client gem needs an update to support the VpcAccessService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.vpc_access_service_available? version: :v1, transport: :grpc - require "google/cloud/vpc_access/#{version.to_s.downcase}" - package_name = Google::Cloud::VpcAccess - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::VpcAccess.const_get package_name - return false unless service_module.const_defined? :VpcAccessService - service_module = service_module.const_get :VpcAccessService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-vpc_access library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.vpc_access if block_given? - - ::Google::Cloud.configure.vpc_access - end - end - end -end - -helper_path = ::File.join __dir__, "vpc_access", "helpers.rb" -require "google/cloud/vpc_access/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access/version.rb b/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access/version.rb deleted file mode 100644 index a1e9745fde8c..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/lib/google/cloud/vpc_access/version.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module VpcAccess - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/client_test.rb b/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/client_test.rb deleted file mode 100644 index 997403d2c783..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/vpc_access" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::VpcAccess::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_vpc_access_service_grpc - skip unless Google::Cloud::VpcAccess.vpc_access_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::VpcAccess.vpc_access_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::VpcAccess::V1::VpcAccessService::Client, client - end - end - - def test_vpc_access_service_rest - skip unless Google::Cloud::VpcAccess.vpc_access_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::VpcAccess.vpc_access_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::VpcAccess::V1::VpcAccessService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/version_test.rb b/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/version_test.rb deleted file mode 100644 index 8e71efe37767..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/test/google/cloud/vpc_access/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/vpc_access/version" - -class Google::Cloud::VpcAccess::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::VpcAccess::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-vpc_access/test/helper.rb b/owl-bot-staging/google-cloud-vpc_access/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-vpc_access/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_risk-v1/.gitignore b/owl-bot-staging/google-cloud-web_risk-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-web_risk-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-web_risk-v1/.repo-metadata.json deleted file mode 100644 index 643cdaf4e9c4..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "webrisk.googleapis.com", - "api_shortname": "webrisk", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest", - "distribution_name": "google-cloud-web_risk-v1", - "is_cloud": true, - "language": "ruby", - "name": "webrisk", - "name_pretty": "Web Risk V1 API", - "product_documentation": "https://cloud.google.com/web-risk", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. Note that google-cloud-web_risk-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_risk instead. See the readme for more details.", - "ruby-cloud-env-prefix": "WEBRISK", - "ruby-cloud-product-url": "https://cloud.google.com/web-risk", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-web_risk-v1/.rubocop.yml b/owl-bot-staging/google-cloud-web_risk-v1/.rubocop.yml deleted file mode 100644 index 8f9201883964..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-web_risk-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-web_risk-v1.rb" diff --git a/owl-bot-staging/google-cloud-web_risk-v1/.toys.rb b/owl-bot-staging/google-cloud-web_risk-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/.yardopts b/owl-bot-staging/google-cloud-web_risk-v1/.yardopts deleted file mode 100644 index ec02341dae2a..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Web Risk 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-web_risk-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_risk-v1/AUTHENTICATION.md deleted file mode 100644 index 5cc149dffad2..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-web_risk-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-web_risk-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/web_risk/v1" - -client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/web_risk/v1" - -::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::WebRisk::V1::WebRiskService::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-web_risk-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/web_risk/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::WebRisk::V1::WebRiskService::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-web_risk-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-web_risk-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-web_risk-v1/Gemfile b/owl-bot-staging/google-cloud-web_risk-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_risk-v1/LICENSE.md b/owl-bot-staging/google-cloud-web_risk-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/README.md b/owl-bot-staging/google-cloud-web_risk-v1/README.md deleted file mode 100644 index b372abe1f580..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Web Risk V1 API - -API Client library for the Web Risk V1 API - -Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Web Risk V1 API. Most users should consider using -the main client gem, -[google-cloud-web_risk](https://rubygems.org/gems/google-cloud-web_risk). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-web_risk-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/webrisk.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/web_risk/v1" - -client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new -request = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new # (request fields as keyword arguments...) -response = client.compute_threat_list_diff request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/web-risk) -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/web_risk/v1" -require "logger" - -client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-web_risk`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-web_risk-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-web_risk`. -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-web_risk-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-web_risk-v1/Rakefile b/owl-bot-staging/google-cloud-web_risk-v1/Rakefile deleted file mode 100644 index 1b6fd789ed60..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WEBRISK_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WEBRISK_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WEBRISK_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 WEBRISK_TEST_PROJECT=test123 WEBRISK_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/web_risk/v1/web_risk_service/credentials" - ::Google::Cloud::WebRisk::V1::WebRiskService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WEBRISK_PROJECT"] = project - ENV["WEBRISK_TEST_PROJECT"] = project - ENV["WEBRISK_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-web_risk-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-web_risk-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-web_risk-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-web_risk-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-web_risk-v1" - header "google-cloud-web_risk-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-web_risk-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-web_risk-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-web_risk-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-web_risk-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-web_risk-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-web_risk-v1/gapic_metadata.json deleted file mode 100644 index 2a721b8d290c..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/gapic_metadata.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.webrisk.v1", - "libraryPackage": "::Google::Cloud::WebRisk::V1", - "services": { - "WebRiskService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::WebRisk::V1::WebRiskService::Client", - "rpcs": { - "ComputeThreatListDiff": { - "methods": [ - "compute_threat_list_diff" - ] - }, - "SearchUris": { - "methods": [ - "search_uris" - ] - }, - "SearchHashes": { - "methods": [ - "search_hashes" - ] - }, - "CreateSubmission": { - "methods": [ - "create_submission" - ] - }, - "SubmitUri": { - "methods": [ - "submit_uri" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-web_risk-v1/google-cloud-web_risk-v1.gemspec b/owl-bot-staging/google-cloud-web_risk-v1/google-cloud-web_risk-v1.gemspec deleted file mode 100644 index 906c2d6daa93..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/google-cloud-web_risk-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/web_risk/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-web_risk-v1" - gem.version = Google::Cloud::WebRisk::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. Note that google-cloud-web_risk-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_risk instead. See the readme for more details." - gem.summary = "API Client library for the Web Risk V1 API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google-cloud-web_risk-v1.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google-cloud-web_risk-v1.rb deleted file mode 100644 index e475a4250097..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google-cloud-web_risk-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/web_risk/v1" diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1.rb deleted file mode 100644 index ad12e150fde4..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/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/web_risk/v1/web_risk_service" -require "google/cloud/web_risk/v1/version" - -module Google - module Cloud - module WebRisk - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/web_risk/v1" - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/web_risk/v1" - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/web_risk/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/rest.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/rest.rb deleted file mode 100644 index 5b0f7ea9f037..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/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/web_risk/v1/web_risk_service/rest" -require "google/cloud/web_risk/v1/version" - -module Google - module Cloud - module WebRisk - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/web_risk/v1/rest" - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/version.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/version.rb deleted file mode 100644 index 0cb886f79570..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/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 WebRisk - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service.rb deleted file mode 100644 index 02e972cd1c09..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_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/web_risk/v1/version" - -require "google/cloud/web_risk/v1/web_risk_service/credentials" -require "google/cloud/web_risk/v1/web_risk_service/paths" -require "google/cloud/web_risk/v1/web_risk_service/operations" -require "google/cloud/web_risk/v1/web_risk_service/client" -require "google/cloud/web_risk/v1/web_risk_service/rest" - -module Google - module Cloud - module WebRisk - module V1 - ## - # Web Risk API defines an interface to detect malicious URLs on your - # website and in client applications. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/web_risk/v1/web_risk_service" - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/web_risk/v1/web_risk_service/rest" - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - module WebRiskService - end - end - end - end -end - -helper_path = ::File.join __dir__, "web_risk_service", "helpers.rb" -require "google/cloud/web_risk/v1/web_risk_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/client.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/client.rb deleted file mode 100644 index b0f4624a8848..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/client.rb +++ /dev/null @@ -1,916 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/webrisk/v1/webrisk_pb" - -module Google - module Cloud - module WebRisk - module V1 - module WebRiskService - ## - # Client for the WebRiskService service. - # - # Web Risk API defines an interface to detect malicious URLs on your - # website and in client applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :web_risk_service_stub - - ## - # Configure the WebRiskService Client class. - # - # See {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WebRiskService clients - # ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "WebRisk", "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.compute_threat_list_diff.timeout = 600.0 - default_config.rpcs.compute_threat_list_diff.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_uris.timeout = 600.0 - default_config.rpcs.search_uris.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_hashes.timeout = 600.0 - default_config.rpcs.search_hashes.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_submission.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the WebRiskService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @web_risk_service_stub.universe_domain - end - - ## - # Create a new WebRiskService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WebRiskService 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/webrisk/v1/webrisk_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 - - @web_risk_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::WebRisk::V1::WebRiskService::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 - ) - - @web_risk_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::WebRisk::V1::WebRiskService::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @web_risk_service_stub.logger - end - - # Service calls - - ## - # Gets the most recent threat list diffs. These diffs should be applied to - # a local database of hashes to keep it up-to-date. If the local database is - # empty or excessively out-of-date, a complete snapshot of the database will - # be returned. This Method only updates a single ThreatList at a time. To - # update multiple ThreatList databases, this method needs to be called once - # for each list. - # - # @overload compute_threat_list_diff(request, options = nil) - # Pass arguments to `compute_threat_list_diff` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil) - # Pass arguments to `compute_threat_list_diff` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param threat_type [::Google::Cloud::WebRisk::V1::ThreatType] - # Required. The threat list to update. Only a single ThreatType should be - # specified per request. If you want to handle multiple ThreatTypes, you must - # make one request per ThreatType. - # @param version_token [::String] - # The current version token of the client for the requested list (the - # client version that was received from the last successful diff). - # If the client does not have a version token (this is the first time calling - # ComputeThreatListDiff), this may be left empty and a full database - # snapshot will be returned. - # @param constraints [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints, ::Hash] - # Required. The constraints associated with this request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new - # - # # Call the compute_threat_list_diff method. - # result = client.compute_threat_list_diff request - # - # # The returned object is of type Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse. - # p result - # - def compute_threat_list_diff request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::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.compute_threat_list_diff.timeout, - metadata: metadata, - retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.call_rpc :compute_threat_list_diff, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # This method is used to check whether a URI is on a given threatList. - # Multiple threatLists may be searched in a single query. - # The response will list all requested threatLists the URI was found to - # match. If the URI is not found on any of the requested ThreatList an - # empty response will be returned. - # - # @overload search_uris(request, options = nil) - # Pass arguments to `search_uris` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::SearchUrisRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::SearchUrisRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_uris(uri: nil, threat_types: nil) - # Pass arguments to `search_uris` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param uri [::String] - # Required. The URI to be checked for matches. - # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] - # Required. The ThreatLists to search in. Multiple ThreatLists may be - # specified. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebRisk::V1::SearchUrisResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::SearchUrisRequest.new - # - # # Call the search_uris method. - # result = client.search_uris request - # - # # The returned object is of type Google::Cloud::WebRisk::V1::SearchUrisResponse. - # p result - # - def search_uris request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchUrisRequest - - # Converts hash and nil to 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_uris.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::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.search_uris.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_uris.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.call_rpc :search_uris, request, 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 full hashes that match the requested hash prefix. - # This is used after a hash prefix is looked up in a threatList - # and there is a match. The client side threatList only holds partial hashes - # so the client must query this method to determine if there is a full - # hash match of a threat. - # - # @overload search_hashes(request, options = nil) - # Pass arguments to `search_hashes` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::SearchHashesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::SearchHashesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hashes(hash_prefix: nil, threat_types: nil) - # Pass arguments to `search_hashes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param hash_prefix [::String] - # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - # hash. For JSON requests, this field is base64-encoded. - # Note that if this parameter is provided by a URI, it must be encoded using - # the web safe base64 variant (RFC 4648). - # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] - # Required. The ThreatLists to search in. Multiple ThreatLists may be - # specified. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebRisk::V1::SearchHashesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebRisk::V1::SearchHashesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::SearchHashesRequest.new - # - # # Call the search_hashes method. - # result = client.search_hashes request - # - # # The returned object is of type Google::Cloud::WebRisk::V1::SearchHashesResponse. - # p result - # - def search_hashes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchHashesRequest - - # Converts hash and nil to 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_hashes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::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.search_hashes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_hashes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.call_rpc :search_hashes, request, 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 Submission of a URI suspected of containing phishing content to - # be reviewed. If the result verifies the existence of malicious phishing - # content, the site will be added to the [Google's Social Engineering - # lists](https://support.google.com/webmasters/answer/6350487/) in order to - # protect users that could get exposed to this threat in the future. Only - # allowlisted projects can use this method during Early Access. Please reach - # out to Sales or your customer engineer to obtain access. - # - # @overload create_submission(request, options = nil) - # Pass arguments to `create_submission` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::CreateSubmissionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_submission(parent: nil, submission: nil) - # Pass arguments to `create_submission` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that is making the submission. This - # string is in the format "projects/\\{project_number}". - # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash] - # Required. The submission that contains the content of the phishing report. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebRisk::V1::Submission] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebRisk::V1::Submission] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new - # - # # Call the create_submission method. - # result = client.create_submission request - # - # # The returned object is of type Google::Cloud::WebRisk::V1::Submission. - # p result - # - def create_submission request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_submission.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_submission.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_submission.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.call_rpc :create_submission, request, 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 URI suspected of containing malicious content to be reviewed. - # Returns a google.longrunning.Operation which, once the review is complete, - # is updated with its result. You can use the [Pub/Sub API] - # (https://cloud.google.com/pubsub) to receive notifications for the returned - # Operation. If the result verifies the existence of malicious content, the - # site will be added to the [Google's Social Engineering lists] - # (https://support.google.com/webmasters/answer/6350487/) in order to - # protect users that could get exposed to this threat in the future. Only - # allowlisted projects can use this method during Early Access. Please reach - # out to Sales or your customer engineer to obtain access. - # - # @overload submit_uri(request, options = nil) - # Pass arguments to `submit_uri` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::SubmitUriRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::SubmitUriRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_uri(parent: nil, submission: nil, threat_info: nil, threat_discovery: nil) - # Pass arguments to `submit_uri` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that is making the submission. This - # string is in the format "projects/\\{project_number}". - # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash] - # Required. The submission that contains the URI to be scanned. - # @param threat_info [::Google::Cloud::WebRisk::V1::ThreatInfo, ::Hash] - # Provides additional information about the submission. - # @param threat_discovery [::Google::Cloud::WebRisk::V1::ThreatDiscovery, ::Hash] - # Provides additional information about how the submission was discovered. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::SubmitUriRequest.new - # - # # Call the submit_uri method. - # result = client.submit_uri request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def submit_uri request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SubmitUriRequest - - # Converts hash and nil to 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_uri.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_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_uri.timeout, - metadata: metadata, - retry_policy: @config.rpcs.submit_uri.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.call_rpc :submit_uri, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 WebRiskService API. - # - # This class represents the configuration for WebRiskService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::WebRisk::V1::WebRiskService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # compute_threat_list_diff to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WebRisk::V1::WebRiskService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.compute_threat_list_diff.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.compute_threat_list_diff.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::WebRisk::V1::WebRiskService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "webrisk.googleapis.com" - - config_attr :endpoint, nil, ::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 WebRiskService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `compute_threat_list_diff` - # @return [::Gapic::Config::Method] - # - attr_reader :compute_threat_list_diff - ## - # RPC-specific configuration for `search_uris` - # @return [::Gapic::Config::Method] - # - attr_reader :search_uris - ## - # RPC-specific configuration for `search_hashes` - # @return [::Gapic::Config::Method] - # - attr_reader :search_hashes - ## - # RPC-specific configuration for `create_submission` - # @return [::Gapic::Config::Method] - # - attr_reader :create_submission - ## - # RPC-specific configuration for `submit_uri` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_uri - - # @private - def initialize parent_rpcs = nil - compute_threat_list_diff_config = parent_rpcs.compute_threat_list_diff if parent_rpcs.respond_to? :compute_threat_list_diff - @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config - search_uris_config = parent_rpcs.search_uris if parent_rpcs.respond_to? :search_uris - @search_uris = ::Gapic::Config::Method.new search_uris_config - search_hashes_config = parent_rpcs.search_hashes if parent_rpcs.respond_to? :search_hashes - @search_hashes = ::Gapic::Config::Method.new search_hashes_config - create_submission_config = parent_rpcs.create_submission if parent_rpcs.respond_to? :create_submission - @create_submission = ::Gapic::Config::Method.new create_submission_config - submit_uri_config = parent_rpcs.submit_uri if parent_rpcs.respond_to? :submit_uri - @submit_uri = ::Gapic::Config::Method.new submit_uri_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/credentials.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/credentials.rb deleted file mode 100644 index dbc56f07610b..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_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 WebRisk - module V1 - module WebRiskService - # Credentials for the WebRiskService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "WEBRISK_CREDENTIALS", - "WEBRISK_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "WEBRISK_CREDENTIALS_JSON", - "WEBRISK_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-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/operations.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/operations.rb deleted file mode 100644 index 0c9945f420ed..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module WebRisk - module V1 - module WebRiskService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the WebRiskService 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 WebRiskService 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::WebRisk::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::WebRisk::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::WebRisk::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::WebRisk::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::WebRisk::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "webrisk.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/paths.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/paths.rb deleted file mode 100644 index b788c51e20cd..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/paths.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebRisk - module V1 - module WebRiskService - # Path helper methods for the WebRiskService API. - module Paths - ## - # Create a fully-qualified Project resource string. - # - # The resource will be in the following format: - # - # `projects/{project}` - # - # @param project [String] - # - # @return [::String] - def project_path project: - "projects/#{project}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest.rb deleted file mode 100644 index 0c1cf72ecccb..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_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/web_risk/v1/version" - -require "google/cloud/web_risk/v1/web_risk_service/credentials" -require "google/cloud/web_risk/v1/web_risk_service/paths" -require "google/cloud/web_risk/v1/web_risk_service/rest/operations" -require "google/cloud/web_risk/v1/web_risk_service/rest/client" - -module Google - module Cloud - module WebRisk - module V1 - ## - # Web Risk API defines an interface to detect malicious URLs on your - # website and in client applications. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/web_risk/v1/web_risk_service/rest" - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - module WebRiskService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/web_risk/v1/web_risk_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/client.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/client.rb deleted file mode 100644 index ee5ae8088b9d..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/client.rb +++ /dev/null @@ -1,862 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/webrisk/v1/webrisk_pb" -require "google/cloud/web_risk/v1/web_risk_service/rest/service_stub" - -module Google - module Cloud - module WebRisk - module V1 - module WebRiskService - module Rest - ## - # REST client for the WebRiskService service. - # - # Web Risk API defines an interface to detect malicious URLs on your - # website and in client applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :web_risk_service_stub - - ## - # Configure the WebRiskService Client class. - # - # See {::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WebRiskService clients - # ::Google::Cloud::WebRisk::V1::WebRiskService::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", "WebRisk", "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.compute_threat_list_diff.timeout = 600.0 - default_config.rpcs.compute_threat_list_diff.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_uris.timeout = 600.0 - default_config.rpcs.search_uris.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_hashes.timeout = 600.0 - default_config.rpcs.search_hashes.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.create_submission.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the WebRiskService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WebRisk::V1::WebRiskService::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 - @web_risk_service_stub.universe_domain - end - - ## - # Create a new WebRiskService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WebRiskService 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::WebRisk::V1::WebRiskService::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 - - @web_risk_service_stub = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @web_risk_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::WebRisk::V1::WebRiskService::Rest::Operations] - # - attr_reader :operations_client - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @web_risk_service_stub.logger - end - - # Service calls - - ## - # Gets the most recent threat list diffs. These diffs should be applied to - # a local database of hashes to keep it up-to-date. If the local database is - # empty or excessively out-of-date, a complete snapshot of the database will - # be returned. This Method only updates a single ThreatList at a time. To - # update multiple ThreatList databases, this method needs to be called once - # for each list. - # - # @overload compute_threat_list_diff(request, options = nil) - # Pass arguments to `compute_threat_list_diff` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil) - # Pass arguments to `compute_threat_list_diff` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param threat_type [::Google::Cloud::WebRisk::V1::ThreatType] - # Required. The threat list to update. Only a single ThreatType should be - # specified per request. If you want to handle multiple ThreatTypes, you must - # make one request per ThreatType. - # @param version_token [::String] - # The current version token of the client for the requested list (the - # client version that was received from the last successful diff). - # If the client does not have a version token (this is the first time calling - # ComputeThreatListDiff), this may be left empty and a full database - # snapshot will be returned. - # @param constraints [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints, ::Hash] - # Required. The constraints associated with this request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new - # - # # Call the compute_threat_list_diff method. - # result = client.compute_threat_list_diff request - # - # # The returned object is of type Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse. - # p result - # - def compute_threat_list_diff request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.compute_threat_list_diff.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.compute_threat_list_diff request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # This method is used to check whether a URI is on a given threatList. - # Multiple threatLists may be searched in a single query. - # The response will list all requested threatLists the URI was found to - # match. If the URI is not found on any of the requested ThreatList an - # empty response will be returned. - # - # @overload search_uris(request, options = nil) - # Pass arguments to `search_uris` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::SearchUrisRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::SearchUrisRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_uris(uri: nil, threat_types: nil) - # Pass arguments to `search_uris` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param uri [::String] - # Required. The URI to be checked for matches. - # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] - # Required. The ThreatLists to search in. Multiple ThreatLists may be - # specified. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchUrisResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::SearchUrisRequest.new - # - # # Call the search_uris method. - # result = client.search_uris request - # - # # The returned object is of type Google::Cloud::WebRisk::V1::SearchUrisResponse. - # p result - # - def search_uris request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchUrisRequest - - # Converts hash and nil to an 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_uris.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_uris.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_uris.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.search_uris request, 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 full hashes that match the requested hash prefix. - # This is used after a hash prefix is looked up in a threatList - # and there is a match. The client side threatList only holds partial hashes - # so the client must query this method to determine if there is a full - # hash match of a threat. - # - # @overload search_hashes(request, options = nil) - # Pass arguments to `search_hashes` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::SearchHashesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::SearchHashesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hashes(hash_prefix: nil, threat_types: nil) - # Pass arguments to `search_hashes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param hash_prefix [::String] - # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - # hash. For JSON requests, this field is base64-encoded. - # Note that if this parameter is provided by a URI, it must be encoded using - # the web safe base64 variant (RFC 4648). - # @param threat_types [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] - # Required. The ThreatLists to search in. Multiple ThreatLists may be - # specified. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchHashesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1::SearchHashesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::SearchHashesRequest.new - # - # # Call the search_hashes method. - # result = client.search_hashes request - # - # # The returned object is of type Google::Cloud::WebRisk::V1::SearchHashesResponse. - # p result - # - def search_hashes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SearchHashesRequest - - # Converts hash and nil to an 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_hashes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hashes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_hashes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.search_hashes request, 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 Submission of a URI suspected of containing phishing content to - # be reviewed. If the result verifies the existence of malicious phishing - # content, the site will be added to the [Google's Social Engineering - # lists](https://support.google.com/webmasters/answer/6350487/) in order to - # protect users that could get exposed to this threat in the future. Only - # allowlisted projects can use this method during Early Access. Please reach - # out to Sales or your customer engineer to obtain access. - # - # @overload create_submission(request, options = nil) - # Pass arguments to `create_submission` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::CreateSubmissionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_submission(parent: nil, submission: nil) - # Pass arguments to `create_submission` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that is making the submission. This - # string is in the format "projects/\\{project_number}". - # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash] - # Required. The submission that contains the content of the phishing report. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1::Submission] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1::Submission] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new - # - # # Call the create_submission method. - # result = client.create_submission request - # - # # The returned object is of type Google::Cloud::WebRisk::V1::Submission. - # p result - # - def create_submission request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest - - # Converts hash and nil to an 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_submission.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_submission.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_submission.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.create_submission request, 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 URI suspected of containing malicious content to be reviewed. - # Returns a google.longrunning.Operation which, once the review is complete, - # is updated with its result. You can use the [Pub/Sub API] - # (https://cloud.google.com/pubsub) to receive notifications for the returned - # Operation. If the result verifies the existence of malicious content, the - # site will be added to the [Google's Social Engineering lists] - # (https://support.google.com/webmasters/answer/6350487/) in order to - # protect users that could get exposed to this threat in the future. Only - # allowlisted projects can use this method during Early Access. Please reach - # out to Sales or your customer engineer to obtain access. - # - # @overload submit_uri(request, options = nil) - # Pass arguments to `submit_uri` via a request object, either of type - # {::Google::Cloud::WebRisk::V1::SubmitUriRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1::SubmitUriRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_uri(parent: nil, submission: nil, threat_info: nil, threat_discovery: nil) - # Pass arguments to `submit_uri` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that is making the submission. This - # string is in the format "projects/\\{project_number}". - # @param submission [::Google::Cloud::WebRisk::V1::Submission, ::Hash] - # Required. The submission that contains the URI to be scanned. - # @param threat_info [::Google::Cloud::WebRisk::V1::ThreatInfo, ::Hash] - # Provides additional information about the submission. - # @param threat_discovery [::Google::Cloud::WebRisk::V1::ThreatDiscovery, ::Hash] - # Provides additional information about how the submission was discovered. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1::SubmitUriRequest.new - # - # # Call the submit_uri method. - # result = client.submit_uri request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def submit_uri request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1::SubmitUriRequest - - # Converts hash and nil to an 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_uri.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_uri.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.submit_uri.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.submit_uri request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 WebRiskService REST API. - # - # This class represents the configuration for WebRiskService 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::WebRisk::V1::WebRiskService::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 - # # compute_threat_list_diff to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.compute_threat_list_diff.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.compute_threat_list_diff.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "webrisk.googleapis.com" - - config_attr :endpoint, nil, ::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 WebRiskService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `compute_threat_list_diff` - # @return [::Gapic::Config::Method] - # - attr_reader :compute_threat_list_diff - ## - # RPC-specific configuration for `search_uris` - # @return [::Gapic::Config::Method] - # - attr_reader :search_uris - ## - # RPC-specific configuration for `search_hashes` - # @return [::Gapic::Config::Method] - # - attr_reader :search_hashes - ## - # RPC-specific configuration for `create_submission` - # @return [::Gapic::Config::Method] - # - attr_reader :create_submission - ## - # RPC-specific configuration for `submit_uri` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_uri - - # @private - def initialize parent_rpcs = nil - compute_threat_list_diff_config = parent_rpcs.compute_threat_list_diff if parent_rpcs.respond_to? :compute_threat_list_diff - @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config - search_uris_config = parent_rpcs.search_uris if parent_rpcs.respond_to? :search_uris - @search_uris = ::Gapic::Config::Method.new search_uris_config - search_hashes_config = parent_rpcs.search_hashes if parent_rpcs.respond_to? :search_hashes - @search_hashes = ::Gapic::Config::Method.new search_hashes_config - create_submission_config = parent_rpcs.create_submission if parent_rpcs.respond_to? :create_submission - @create_submission = ::Gapic::Config::Method.new create_submission_config - submit_uri_config = parent_rpcs.submit_uri if parent_rpcs.respond_to? :submit_uri - @submit_uri = ::Gapic::Config::Method.new submit_uri_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/operations.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/operations.rb deleted file mode 100644 index 1c9a2c9901a1..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module WebRisk - module V1 - module WebRiskService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the WebRiskService 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 WebRiskService 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::WebRisk::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::WebRisk::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::WebRisk::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::WebRisk::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "webrisk.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, 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/[^/]+/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/[^/]+/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/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/service_stub.rb deleted file mode 100644 index f1c555943374..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/web_risk/v1/web_risk_service/rest/service_stub.rb +++ /dev/null @@ -1,382 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/webrisk/v1/webrisk_pb" - -module Google - module Cloud - module WebRisk - module V1 - module WebRiskService - module Rest - ## - # REST service stub for the WebRiskService 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 compute_threat_list_diff REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse] - # A result object deserialized from the server's reply - def compute_threat_list_diff request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_compute_threat_list_diff_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "compute_threat_list_diff", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse.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_uris REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::SearchUrisRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchUrisResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse] - # A result object deserialized from the server's reply - def search_uris request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_uris_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_uris", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebRisk::V1::SearchUrisResponse.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_hashes REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::SearchHashesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1::SearchHashesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1::SearchHashesResponse] - # A result object deserialized from the server's reply - def search_hashes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_hashes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hashes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebRisk::V1::SearchHashesResponse.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_submission REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1::Submission] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1::Submission] - # A result object deserialized from the server's reply - def create_submission request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_submission_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_submission", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebRisk::V1::Submission.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_uri REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::SubmitUriRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def submit_uri request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_submit_uri_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_uri", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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 compute_threat_list_diff REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_compute_threat_list_diff_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/threatLists:computeDiff", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_uris REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::SearchUrisRequest] - # 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_uris_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/uris:search", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_hashes REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::SearchHashesRequest] - # 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_hashes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/hashes:search", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_submission REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::CreateSubmissionRequest] - # 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_submission_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/submissions", - body: "submission", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the submit_uri REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1::SubmitUriRequest] - # 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_uri_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/uris:submit", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_pb.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_pb.rb deleted file mode 100644 index 55280fad2c55..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_pb.rb +++ /dev/null @@ -1,80 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/webrisk/v1/webrisk.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/webrisk/v1/webrisk.proto\x12\x17google.cloud.webrisk.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\"\xe3\x02\n\x1c\x43omputeThreatListDiffRequest\x12=\n\x0bthreat_type\x18\x01 \x01(\x0e\x32#.google.cloud.webrisk.v1.ThreatTypeB\x03\xe0\x41\x02\x12\x15\n\rversion_token\x18\x02 \x01(\x0c\x12[\n\x0b\x63onstraints\x18\x03 \x01(\x0b\x32\x41.google.cloud.webrisk.v1.ComputeThreatListDiffRequest.ConstraintsB\x03\xe0\x41\x02\x1a\x8f\x01\n\x0b\x43onstraints\x12\x18\n\x10max_diff_entries\x18\x01 \x01(\x05\x12\x1c\n\x14max_database_entries\x18\x02 \x01(\x05\x12H\n\x16supported_compressions\x18\x03 \x03(\x0e\x32(.google.cloud.webrisk.v1.CompressionType\"\x86\x04\n\x1d\x43omputeThreatListDiffResponse\x12Z\n\rresponse_type\x18\x04 \x01(\x0e\x32\x43.google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType\x12@\n\tadditions\x18\x05 \x01(\x0b\x32-.google.cloud.webrisk.v1.ThreatEntryAdditions\x12>\n\x08removals\x18\x06 \x01(\x0b\x32,.google.cloud.webrisk.v1.ThreatEntryRemovals\x12\x19\n\x11new_version_token\x18\x07 \x01(\x0c\x12Q\n\x08\x63hecksum\x18\x08 \x01(\x0b\x32?.google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum\x12\x39\n\x15recommended_next_diff\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1a\n\x08\x43hecksum\x12\x0e\n\x06sha256\x18\x01 \x01(\x0c\"B\n\x0cResponseType\x12\x1d\n\x19RESPONSE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44IFF\x10\x01\x12\t\n\x05RESET\x10\x02\"e\n\x11SearchUrisRequest\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0cthreat_types\x18\x02 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatTypeB\x03\xe0\x41\x02\"\xd4\x01\n\x12SearchUrisResponse\x12\x45\n\x06threat\x18\x01 \x01(\x0b\x32\x35.google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri\x1aw\n\tThreatUri\x12\x39\n\x0cthreat_types\x18\x01 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatType\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"j\n\x13SearchHashesRequest\x12\x13\n\x0bhash_prefix\x18\x01 \x01(\x0c\x12>\n\x0cthreat_types\x18\x02 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatTypeB\x03\xe0\x41\x02\"\xa4\x02\n\x14SearchHashesResponse\x12I\n\x07threats\x18\x01 \x03(\x0b\x32\x38.google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash\x12\x38\n\x14negative_expire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x86\x01\n\nThreatHash\x12\x39\n\x0cthreat_types\x18\x01 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatType\x12\x0c\n\x04hash\x18\x02 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x8f\x01\n\x14ThreatEntryAdditions\x12\x36\n\nraw_hashes\x18\x01 \x03(\x0b\x32\".google.cloud.webrisk.v1.RawHashes\x12?\n\x0brice_hashes\x18\x02 \x01(\x0b\x32*.google.cloud.webrisk.v1.RiceDeltaEncoding\"\x91\x01\n\x13ThreatEntryRemovals\x12\x38\n\x0braw_indices\x18\x01 \x01(\x0b\x32#.google.cloud.webrisk.v1.RawIndices\x12@\n\x0crice_indices\x18\x02 \x01(\x0b\x32*.google.cloud.webrisk.v1.RiceDeltaEncoding\"\x1d\n\nRawIndices\x12\x0f\n\x07indices\x18\x01 \x03(\x05\"4\n\tRawHashes\x12\x13\n\x0bprefix_size\x18\x01 \x01(\x05\x12\x12\n\nraw_hashes\x18\x02 \x01(\x0c\"k\n\x11RiceDeltaEncoding\x12\x13\n\x0b\x66irst_value\x18\x01 \x01(\x03\x12\x16\n\x0erice_parameter\x18\x02 \x01(\x05\x12\x13\n\x0b\x65ntry_count\x18\x03 \x01(\x05\x12\x14\n\x0c\x65ncoded_data\x18\x04 \x01(\x0c\"^\n\nSubmission\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12>\n\x0cthreat_types\x18\x02 \x03(\x0e\x32#.google.cloud.webrisk.v1.ThreatTypeB\x03\xe0\x41\x03\"\xa5\x06\n\nThreatInfo\x12\x41\n\nabuse_type\x18\x01 \x01(\x0e\x32-.google.cloud.webrisk.v1.ThreatInfo.AbuseType\x12I\n\x11threat_confidence\x18\x02 \x01(\x0b\x32..google.cloud.webrisk.v1.ThreatInfo.Confidence\x12U\n\x14threat_justification\x18\x03 \x01(\x0b\x32\x37.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification\x1a\xcb\x01\n\nConfidence\x12\x0f\n\x05score\x18\x01 \x01(\x02H\x00\x12O\n\x05level\x18\x02 \x01(\x0e\x32>.google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevelH\x00\"R\n\x0f\x43onfidenceLevel\x12 \n\x1c\x43ONFIDENCE_LEVEL_UNSPECIFIED\x10\x00\x12\x07\n\x03LOW\x10\x01\x12\n\n\x06MEDIUM\x10\x02\x12\x08\n\x04HIGH\x10\x03\x42\x07\n\x05value\x1a\xfe\x01\n\x13ThreatJustification\x12Z\n\x06labels\x18\x01 \x03(\x0e\x32J.google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel\x12\x10\n\x08\x63omments\x18\x02 \x03(\t\"y\n\x12JustificationLabel\x12#\n\x1fJUSTIFICATION_LABEL_UNSPECIFIED\x10\x00\x12\x17\n\x13MANUAL_VERIFICATION\x10\x01\x12\x0f\n\x0bUSER_REPORT\x10\x02\x12\x14\n\x10\x41UTOMATED_REPORT\x10\x03\"c\n\tAbuseType\x12\x1a\n\x16\x41\x42USE_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MALWARE\x10\x01\x12\x16\n\x12SOCIAL_ENGINEERING\x10\x02\x12\x15\n\x11UNWANTED_SOFTWARE\x10\x03\"\xc0\x01\n\x0fThreatDiscovery\x12\x43\n\x08platform\x18\x01 \x01(\x0e\x32\x31.google.cloud.webrisk.v1.ThreatDiscovery.Platform\x12\x14\n\x0cregion_codes\x18\x02 \x03(\t\"R\n\x08Platform\x12\x18\n\x14PLATFORM_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x41NDROID\x10\x01\x12\x07\n\x03IOS\x10\x02\x12\t\n\x05MACOS\x10\x03\x12\x0b\n\x07WINDOWS\x10\x04\"\x9c\x01\n\x17\x43reateSubmissionRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12<\n\nsubmission\x18\x02 \x01(\x0b\x32#.google.cloud.webrisk.v1.SubmissionB\x03\xe0\x41\x02\"\x93\x02\n\x10SubmitUriRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12<\n\nsubmission\x18\x02 \x01(\x0b\x32#.google.cloud.webrisk.v1.SubmissionB\x03\xe0\x41\x02\x12\x38\n\x0bthreat_info\x18\x03 \x01(\x0b\x32#.google.cloud.webrisk.v1.ThreatInfo\x12\x42\n\x10threat_discovery\x18\x04 \x01(\x0b\x32(.google.cloud.webrisk.v1.ThreatDiscovery\"\x99\x02\n\x11SubmitUriMetadata\x12?\n\x05state\x18\x01 \x01(\x0e\x32\x30.google.cloud.webrisk.v1.SubmitUriMetadata.State\x12/\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"a\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07RUNNING\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\n\n\x06\x43LOSED\x10\x05*\x8f\x01\n\nThreatType\x12\x1b\n\x17THREAT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MALWARE\x10\x01\x12\x16\n\x12SOCIAL_ENGINEERING\x10\x02\x12\x15\n\x11UNWANTED_SOFTWARE\x10\x03\x12(\n$SOCIAL_ENGINEERING_EXTENDED_COVERAGE\x10\x04*F\n\x0f\x43ompressionType\x12 \n\x1c\x43OMPRESSION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x08\n\x04RICE\x10\x02\x32\xe1\x07\n\x0eWebRiskService\x12\xd3\x01\n\x15\x43omputeThreatListDiff\x12\x35.google.cloud.webrisk.v1.ComputeThreatListDiffRequest\x1a\x36.google.cloud.webrisk.v1.ComputeThreatListDiffResponse\"K\xda\x41%threat_type,version_token,constraints\x82\xd3\xe4\x93\x02\x1d\x12\x1b/v1/threatLists:computeDiff\x12\x91\x01\n\nSearchUris\x12*.google.cloud.webrisk.v1.SearchUrisRequest\x1a+.google.cloud.webrisk.v1.SearchUrisResponse\"*\xda\x41\x10uri,threat_types\x82\xd3\xe4\x93\x02\x11\x12\x0f/v1/uris:search\x12\xa1\x01\n\x0cSearchHashes\x12,.google.cloud.webrisk.v1.SearchHashesRequest\x1a-.google.cloud.webrisk.v1.SearchHashesResponse\"4\xda\x41\x18hash_prefix,threat_types\x82\xd3\xe4\x93\x02\x13\x12\x11/v1/hashes:search\x12\xb6\x01\n\x10\x43reateSubmission\x12\x30.google.cloud.webrisk.v1.CreateSubmissionRequest\x1a#.google.cloud.webrisk.v1.Submission\"K\xda\x41\x11parent,submission\x82\xd3\xe4\x93\x02\x31\"#/v1/{parent=projects/*}/submissions:\nsubmission\x12\xbb\x01\n\tSubmitUri\x12).google.cloud.webrisk.v1.SubmitUriRequest\x1a\x1d.google.longrunning.Operation\"d\xca\x41\x1f\n\nSubmission\x12\x11SubmitUriMetadata\xda\x41\x11parent,submission\x82\xd3\xe4\x93\x02(\"#/v1/{parent=projects/*}/uris:submit:\x01*\x1aJ\xca\x41\x16webrisk.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb6\x01\n\x15\x63om.google.webrisk.v1B\x0cWebRiskProtoP\x01Z5cloud.google.com/go/webrisk/apiv1/webriskpb;webriskpb\xa2\x02\x04GCWR\xaa\x02\x17Google.Cloud.WebRisk.V1\xca\x02\x17Google\\Cloud\\WebRisk\\V1\xea\x02\x1aGoogle::Cloud::WebRisk::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebRisk - module V1 - ComputeThreatListDiffRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffRequest").msgclass - ComputeThreatListDiffRequest::Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffRequest.Constraints").msgclass - ComputeThreatListDiffResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffResponse").msgclass - ComputeThreatListDiffResponse::Checksum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffResponse.Checksum").msgclass - ComputeThreatListDiffResponse::ResponseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ComputeThreatListDiffResponse.ResponseType").enummodule - SearchUrisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchUrisRequest").msgclass - SearchUrisResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchUrisResponse").msgclass - SearchUrisResponse::ThreatUri = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchUrisResponse.ThreatUri").msgclass - SearchHashesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchHashesRequest").msgclass - SearchHashesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchHashesResponse").msgclass - SearchHashesResponse::ThreatHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SearchHashesResponse.ThreatHash").msgclass - ThreatEntryAdditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatEntryAdditions").msgclass - ThreatEntryRemovals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatEntryRemovals").msgclass - RawIndices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.RawIndices").msgclass - RawHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.RawHashes").msgclass - RiceDeltaEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.RiceDeltaEncoding").msgclass - Submission = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.Submission").msgclass - ThreatInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo").msgclass - ThreatInfo::Confidence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.Confidence").msgclass - ThreatInfo::Confidence::ConfidenceLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.Confidence.ConfidenceLevel").enummodule - ThreatInfo::ThreatJustification = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.ThreatJustification").msgclass - ThreatInfo::ThreatJustification::JustificationLabel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.ThreatJustification.JustificationLabel").enummodule - ThreatInfo::AbuseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatInfo.AbuseType").enummodule - ThreatDiscovery = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatDiscovery").msgclass - ThreatDiscovery::Platform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatDiscovery.Platform").enummodule - CreateSubmissionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.CreateSubmissionRequest").msgclass - SubmitUriRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SubmitUriRequest").msgclass - SubmitUriMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SubmitUriMetadata").msgclass - SubmitUriMetadata::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.SubmitUriMetadata.State").enummodule - ThreatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.ThreatType").enummodule - CompressionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1.CompressionType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_services_pb.rb b/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_services_pb.rb deleted file mode 100644 index c3a55b60711c..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/lib/google/cloud/webrisk/v1/webrisk_services_pb.rb +++ /dev/null @@ -1,82 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/webrisk/v1/webrisk.proto for package 'Google.Cloud.WebRisk.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/webrisk/v1/webrisk_pb' - -module Google - module Cloud - module WebRisk - module V1 - module WebRiskService - # Web Risk API defines an interface to detect malicious URLs on your - # website and in client applications. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.webrisk.v1.WebRiskService' - - # Gets the most recent threat list diffs. These diffs should be applied to - # a local database of hashes to keep it up-to-date. If the local database is - # empty or excessively out-of-date, a complete snapshot of the database will - # be returned. This Method only updates a single ThreatList at a time. To - # update multiple ThreatList databases, this method needs to be called once - # for each list. - rpc :ComputeThreatListDiff, ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse - # This method is used to check whether a URI is on a given threatList. - # Multiple threatLists may be searched in a single query. - # The response will list all requested threatLists the URI was found to - # match. If the URI is not found on any of the requested ThreatList an - # empty response will be returned. - rpc :SearchUris, ::Google::Cloud::WebRisk::V1::SearchUrisRequest, ::Google::Cloud::WebRisk::V1::SearchUrisResponse - # Gets the full hashes that match the requested hash prefix. - # This is used after a hash prefix is looked up in a threatList - # and there is a match. The client side threatList only holds partial hashes - # so the client must query this method to determine if there is a full - # hash match of a threat. - rpc :SearchHashes, ::Google::Cloud::WebRisk::V1::SearchHashesRequest, ::Google::Cloud::WebRisk::V1::SearchHashesResponse - # Creates a Submission of a URI suspected of containing phishing content to - # be reviewed. If the result verifies the existence of malicious phishing - # content, the site will be added to the [Google's Social Engineering - # lists](https://support.google.com/webmasters/answer/6350487/) in order to - # protect users that could get exposed to this threat in the future. Only - # allowlisted projects can use this method during Early Access. Please reach - # out to Sales or your customer engineer to obtain access. - rpc :CreateSubmission, ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, ::Google::Cloud::WebRisk::V1::Submission - # Submits a URI suspected of containing malicious content to be reviewed. - # Returns a google.longrunning.Operation which, once the review is complete, - # is updated with its result. You can use the [Pub/Sub API] - # (https://cloud.google.com/pubsub) to receive notifications for the returned - # Operation. If the result verifies the existence of malicious content, the - # site will be added to the [Google's Social Engineering lists] - # (https://support.google.com/webmasters/answer/6350487/) in order to - # protect users that could get exposed to this threat in the future. Only - # allowlisted projects can use this method during Early Access. Please reach - # out to Sales or your customer engineer to obtain access. - rpc :SubmitUri, ::Google::Cloud::WebRisk::V1::SubmitUriRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/README.md deleted file mode 100644 index 3b26f78c15d7..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Web Risk 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-web_risk-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/cloud/webrisk/v1/webrisk.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/cloud/webrisk/v1/webrisk.rb deleted file mode 100644 index bf4b11141acb..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/cloud/webrisk/v1/webrisk.rb +++ /dev/null @@ -1,528 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebRisk - module V1 - # Describes an API diff request. - # @!attribute [rw] threat_type - # @return [::Google::Cloud::WebRisk::V1::ThreatType] - # Required. The threat list to update. Only a single ThreatType should be - # specified per request. If you want to handle multiple ThreatTypes, you must - # make one request per ThreatType. - # @!attribute [rw] version_token - # @return [::String] - # The current version token of the client for the requested list (the - # client version that was received from the last successful diff). - # If the client does not have a version token (this is the first time calling - # ComputeThreatListDiff), this may be left empty and a full database - # snapshot will be returned. - # @!attribute [rw] constraints - # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints] - # Required. The constraints associated with this request. - class ComputeThreatListDiffRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The constraints for this diff. - # @!attribute [rw] max_diff_entries - # @return [::Integer] - # The maximum size in number of entries. The diff will not contain more - # entries than this value. This should be a power of 2 between 2**10 and - # 2**20. If zero, no diff size limit is set. - # @!attribute [rw] max_database_entries - # @return [::Integer] - # Sets the maximum number of entries that the client is willing to have - # in the local database. This should be a power of 2 between 2**10 and - # 2**20. If zero, no database size limit is set. - # @!attribute [rw] supported_compressions - # @return [::Array<::Google::Cloud::WebRisk::V1::CompressionType>] - # The compression types supported by the client. - class Constraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] response_type - # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse::ResponseType] - # The type of response. This may indicate that an action must be taken by the - # client when the response is received. - # @!attribute [rw] additions - # @return [::Google::Cloud::WebRisk::V1::ThreatEntryAdditions] - # A set of entries to add to a local threat type's list. - # @!attribute [rw] removals - # @return [::Google::Cloud::WebRisk::V1::ThreatEntryRemovals] - # A set of entries to remove from a local threat type's list. - # This field may be empty. - # @!attribute [rw] new_version_token - # @return [::String] - # The new opaque client version token. This should be retained by the client - # and passed into the next call of ComputeThreatListDiff as 'version_token'. - # A separate version token should be stored and used for each threatList. - # @!attribute [rw] checksum - # @return [::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse::Checksum] - # The expected SHA256 hash of the client state; that is, of the sorted list - # of all hashes present in the database after applying the provided diff. - # If the client state doesn't match the expected state, the client must - # discard this diff and retry later. - # @!attribute [rw] recommended_next_diff - # @return [::Google::Protobuf::Timestamp] - # The soonest the client should wait before issuing any diff - # request. Querying sooner is unlikely to produce a meaningful diff. - # Waiting longer is acceptable considering the use case. - # If this field is not set clients may update as soon as they want. - class ComputeThreatListDiffResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The expected state of a client's local database. - # @!attribute [rw] sha256 - # @return [::String] - # The SHA256 hash of the client state; that is, of the sorted list of all - # hashes present in the database. - class Checksum - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of response sent to the client. - module ResponseType - # Unknown. - RESPONSE_TYPE_UNSPECIFIED = 0 - - # Partial updates are applied to the client's existing local database. - DIFF = 1 - - # Full updates resets the client's entire local database. This means - # that either the client had no state, was seriously out-of-date, - # or the client is believed to be corrupt. - RESET = 2 - end - end - - # Request to check URI entries against threatLists. - # @!attribute [rw] uri - # @return [::String] - # Required. The URI to be checked for matches. - # @!attribute [rw] threat_types - # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] - # Required. The ThreatLists to search in. Multiple ThreatLists may be - # specified. - class SearchUrisRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] threat - # @return [::Google::Cloud::WebRisk::V1::SearchUrisResponse::ThreatUri] - # The threat list matches. This might be empty if the URI is on no list. - class SearchUrisResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains threat information on a matching uri. - # @!attribute [rw] threat_types - # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] - # The ThreatList this threat belongs to. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # The cache lifetime for the returned match. Clients must not cache this - # response past this timestamp to avoid false positives. - class ThreatUri - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request to return full hashes matched by the provided hash prefixes. - # @!attribute [rw] hash_prefix - # @return [::String] - # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - # hash. For JSON requests, this field is base64-encoded. - # Note that if this parameter is provided by a URI, it must be encoded using - # the web safe base64 variant (RFC 4648). - # @!attribute [rw] threat_types - # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] - # Required. The ThreatLists to search in. Multiple ThreatLists may be - # specified. - class SearchHashesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] threats - # @return [::Array<::Google::Cloud::WebRisk::V1::SearchHashesResponse::ThreatHash>] - # The full hashes that matched the requested prefixes. - # The hash will be populated in the key. - # @!attribute [rw] negative_expire_time - # @return [::Google::Protobuf::Timestamp] - # For requested entities that did not match the threat list, how long to - # cache the response until. - class SearchHashesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains threat information on a matching hash. - # @!attribute [rw] threat_types - # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] - # The ThreatList this threat belongs to. - # This must contain at least one entry. - # @!attribute [rw] hash - # @return [::String] - # A 32 byte SHA256 hash. This field is in binary format. For JSON - # requests, hashes are base64-encoded. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # The cache lifetime for the returned match. Clients must not cache this - # response past this timestamp to avoid false positives. - class ThreatHash - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Contains the set of entries to add to a local database. - # May contain a combination of compressed and raw data in a single response. - # @!attribute [rw] raw_hashes - # @return [::Array<::Google::Cloud::WebRisk::V1::RawHashes>] - # The raw SHA256-formatted entries. - # Repeated to allow returning sets of hashes with different prefix sizes. - # @!attribute [rw] rice_hashes - # @return [::Google::Cloud::WebRisk::V1::RiceDeltaEncoding] - # The encoded 4-byte prefixes of SHA256-formatted entries, using a - # Golomb-Rice encoding. The hashes are converted to uint32, sorted in - # ascending order, then delta encoded and stored as encoded_data. - class ThreatEntryAdditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains the set of entries to remove from a local database. - # @!attribute [rw] raw_indices - # @return [::Google::Cloud::WebRisk::V1::RawIndices] - # The raw removal indices for a local list. - # @!attribute [rw] rice_indices - # @return [::Google::Cloud::WebRisk::V1::RiceDeltaEncoding] - # The encoded local, lexicographically-sorted list indices, using a - # Golomb-Rice encoding. Used for sending compressed removal indices. The - # removal indices (uint32) are sorted in ascending order, then delta encoded - # and stored as encoded_data. - class ThreatEntryRemovals - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of raw indices to remove from a local list. - # @!attribute [rw] indices - # @return [::Array<::Integer>] - # The indices to remove from a lexicographically-sorted local list. - class RawIndices - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The uncompressed threat entries in hash format. - # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 - # bytes, but some hashes are lengthened if they collide with the hash of a - # popular URI. - # - # Used for sending ThreatEntryAdditons to clients that do not support - # compression, or when sending non-4-byte hashes to clients that do support - # compression. - # @!attribute [rw] prefix_size - # @return [::Integer] - # The number of bytes for each prefix encoded below. This field can be - # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - # In practice this is almost always 4, except in exceptional circumstances. - # @!attribute [rw] raw_hashes - # @return [::String] - # The hashes, in binary format, concatenated into one long string. Hashes are - # sorted in lexicographic order. For JSON API users, hashes are - # base64-encoded. - class RawHashes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or - # compressed removal indices. - # @!attribute [rw] first_value - # @return [::Integer] - # The offset of the first entry in the encoded data, or, if only a single - # integer was encoded, that single integer's value. If the field is empty or - # missing, assume zero. - # @!attribute [rw] rice_parameter - # @return [::Integer] - # The Golomb-Rice parameter, which is a number between 2 and 28. This field - # is missing (that is, zero) if `num_entries` is zero. - # @!attribute [rw] entry_count - # @return [::Integer] - # The number of entries that are delta encoded in the encoded data. If only a - # single integer was encoded, this will be zero and the single value will be - # stored in `first_value`. - # @!attribute [rw] encoded_data - # @return [::String] - # The encoded deltas that are encoded using the Golomb-Rice coder. - class RiceDeltaEncoding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wraps a URI that might be displaying malicious content. - # @!attribute [rw] uri - # @return [::String] - # Required. The URI that is being reported for malicious content to be - # analyzed. - # @!attribute [r] threat_types - # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatType>] - # Output only. ThreatTypes found to be associated with the submitted URI - # after reviewing it. This might be empty if the URI was not added to any - # list. - class Submission - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Context about the submission including the type of abuse found on the URI and - # supporting details. - # @!attribute [rw] abuse_type - # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::AbuseType] - # The type of abuse. - # @!attribute [rw] threat_confidence - # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::Confidence] - # Confidence that the URI is unsafe. - # @!attribute [rw] threat_justification - # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::ThreatJustification] - # Context about why the URI is unsafe. - class ThreatInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Confidence that a URI is unsafe. - # @!attribute [rw] score - # @return [::Float] - # A decimal representation of confidence in the range of 0 - # to 1 where 0 indicates no confidence and 1 indicates - # complete confidence. - # - # Note: The following fields are mutually exclusive: `score`, `level`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] level - # @return [::Google::Cloud::WebRisk::V1::ThreatInfo::Confidence::ConfidenceLevel] - # Enum representation of confidence. - # - # Note: The following fields are mutually exclusive: `level`, `score`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Confidence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum representation of confidence. - module ConfidenceLevel - # Default. - CONFIDENCE_LEVEL_UNSPECIFIED = 0 - - # Less than 60% confidence that the URI is unsafe. - LOW = 1 - - # Between 60% and 80% confidence that the URI is unsafe. - MEDIUM = 2 - - # Greater than 80% confidence that the URI is unsafe. - HIGH = 3 - end - end - - # Context about why the URI is unsafe. - # @!attribute [rw] labels - # @return [::Array<::Google::Cloud::WebRisk::V1::ThreatInfo::ThreatJustification::JustificationLabel>] - # Labels associated with this URI that explain how it was classified. - # @!attribute [rw] comments - # @return [::Array<::String>] - # Free-form context on why this URI is unsafe. - class ThreatJustification - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Labels that explain how the URI was classified. - module JustificationLabel - # Default. - JUSTIFICATION_LABEL_UNSPECIFIED = 0 - - # The submitter manually verified that the submission is unsafe. - MANUAL_VERIFICATION = 1 - - # The submitter received the submission from an end user. - USER_REPORT = 2 - - # The submitter received the submission from an automated system. - AUTOMATED_REPORT = 3 - end - end - - # The abuse type found on the URI. - module AbuseType - # Default. - ABUSE_TYPE_UNSPECIFIED = 0 - - # The URI contains malware. - MALWARE = 1 - - # The URI contains social engineering. - SOCIAL_ENGINEERING = 2 - - # The URI contains unwanted software. - UNWANTED_SOFTWARE = 3 - end - end - - # Details about how the threat was discovered. - # @!attribute [rw] platform - # @return [::Google::Cloud::WebRisk::V1::ThreatDiscovery::Platform] - # Platform on which the threat was discovered. - # @!attribute [rw] region_codes - # @return [::Array<::String>] - # CLDR region code of the countries/regions the URI poses a threat ordered - # from most impact to least impact. Example: "US" for United States. - class ThreatDiscovery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Platform types. - module Platform - # Default. - PLATFORM_UNSPECIFIED = 0 - - # General Android platform. - ANDROID = 1 - - # General iOS platform. - IOS = 2 - - # General macOS platform. - MACOS = 3 - - # General Windows platform. - WINDOWS = 4 - end - end - - # Request to send a potentially phishy URI to WebRisk. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project that is making the submission. This - # string is in the format "projects/\\{project_number}". - # @!attribute [rw] submission - # @return [::Google::Cloud::WebRisk::V1::Submission] - # Required. The submission that contains the content of the phishing report. - class CreateSubmissionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to send a potentially malicious URI to WebRisk. - # @!attribute [rw] parent - # @return [::String] - # Required. The name of the project that is making the submission. This - # string is in the format "projects/\\{project_number}". - # @!attribute [rw] submission - # @return [::Google::Cloud::WebRisk::V1::Submission] - # Required. The submission that contains the URI to be scanned. - # @!attribute [rw] threat_info - # @return [::Google::Cloud::WebRisk::V1::ThreatInfo] - # Provides additional information about the submission. - # @!attribute [rw] threat_discovery - # @return [::Google::Cloud::WebRisk::V1::ThreatDiscovery] - # Provides additional information about how the submission was discovered. - class SubmitUriRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the Submit URI long-running operation. - # @!attribute [rw] state - # @return [::Google::Cloud::WebRisk::V1::SubmitUriMetadata::State] - # The state of the operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Creation time of the operation. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Latest update time of the operation. - class SubmitUriMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum that represents the state of the long-running operation. - module State - # Default unspecified state. - STATE_UNSPECIFIED = 0 - - # The operation is currently running. - RUNNING = 1 - - # The operation finished with a success status. - SUCCEEDED = 2 - - # The operation was cancelled. - CANCELLED = 3 - - # The operation finished with a failure status. - FAILED = 4 - - # The operation was closed with no action taken. - CLOSED = 5 - end - end - - # The type of threat. This maps directly to the threat list a threat may - # belong to. - module ThreatType - # No entries should match this threat type. This threat type is unused. - THREAT_TYPE_UNSPECIFIED = 0 - - # Malware targeting any platform. - MALWARE = 1 - - # Social engineering targeting any platform. - SOCIAL_ENGINEERING = 2 - - # Unwanted software targeting any platform. - UNWANTED_SOFTWARE = 3 - - # A list of extended coverage social engineering URIs targeting any - # platform. - SOCIAL_ENGINEERING_EXTENDED_COVERAGE = 4 - end - - # The ways in which threat entry sets can be compressed. - module CompressionType - # Unknown. - COMPRESSION_TYPE_UNSPECIFIED = 0 - - # Raw, uncompressed data. - RAW = 1 - - # Rice-Golomb encoded data. - RICE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-web_risk-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-web_risk-v1/snippets/Gemfile deleted file mode 100644 index 6a085ad32072..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1", path: "../" -else - gem "google-cloud-web_risk-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-web_risk-v1/snippets/snippet_metadata_google.cloud.webrisk.v1.json b/owl-bot-staging/google-cloud-web_risk-v1/snippets/snippet_metadata_google.cloud.webrisk.v1.json deleted file mode 100644 index b80bf1f12e06..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/snippets/snippet_metadata_google.cloud.webrisk.v1.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-web_risk-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.webrisk.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync", - "title": "Snippet for the compute_threat_list_diff call in the WebRiskService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#compute_threat_list_diff.", - "file": "web_risk_service/compute_threat_list_diff.rb", - "language": "RUBY", - "client_method": { - "short_name": "compute_threat_list_diff", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#compute_threat_list_diff", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse", - "client": { - "short_name": "WebRiskService::Client", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" - }, - "method": { - "short_name": "ComputeThreatListDiff", - "full_name": "google.cloud.webrisk.v1.WebRiskService.ComputeThreatListDiff", - "service": { - "short_name": "WebRiskService", - "full_name": "google.cloud.webrisk.v1.WebRiskService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "webrisk_v1_generated_WebRiskService_SearchUris_sync", - "title": "Snippet for the search_uris call in the WebRiskService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#search_uris.", - "file": "web_risk_service/search_uris.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_uris", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#search_uris", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebRisk::V1::SearchUrisRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebRisk::V1::SearchUrisResponse", - "client": { - "short_name": "WebRiskService::Client", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" - }, - "method": { - "short_name": "SearchUris", - "full_name": "google.cloud.webrisk.v1.WebRiskService.SearchUris", - "service": { - "short_name": "WebRiskService", - "full_name": "google.cloud.webrisk.v1.WebRiskService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "webrisk_v1_generated_WebRiskService_SearchHashes_sync", - "title": "Snippet for the search_hashes call in the WebRiskService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#search_hashes.", - "file": "web_risk_service/search_hashes.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_hashes", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#search_hashes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebRisk::V1::SearchHashesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebRisk::V1::SearchHashesResponse", - "client": { - "short_name": "WebRiskService::Client", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" - }, - "method": { - "short_name": "SearchHashes", - "full_name": "google.cloud.webrisk.v1.WebRiskService.SearchHashes", - "service": { - "short_name": "WebRiskService", - "full_name": "google.cloud.webrisk.v1.WebRiskService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "webrisk_v1_generated_WebRiskService_CreateSubmission_sync", - "title": "Snippet for the create_submission call in the WebRiskService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#create_submission.", - "file": "web_risk_service/create_submission.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_submission", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#create_submission", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebRisk::V1::CreateSubmissionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebRisk::V1::Submission", - "client": { - "short_name": "WebRiskService::Client", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" - }, - "method": { - "short_name": "CreateSubmission", - "full_name": "google.cloud.webrisk.v1.WebRiskService.CreateSubmission", - "service": { - "short_name": "WebRiskService", - "full_name": "google.cloud.webrisk.v1.WebRiskService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "webrisk_v1_generated_WebRiskService_SubmitUri_sync", - "title": "Snippet for the submit_uri call in the WebRiskService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1::WebRiskService::Client#submit_uri.", - "file": "web_risk_service/submit_uri.rb", - "language": "RUBY", - "client_method": { - "short_name": "submit_uri", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client#submit_uri", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebRisk::V1::SubmitUriRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "WebRiskService::Client", - "full_name": "::Google::Cloud::WebRisk::V1::WebRiskService::Client" - }, - "method": { - "short_name": "SubmitUri", - "full_name": "google.cloud.webrisk.v1.WebRiskService.SubmitUri", - "service": { - "short_name": "WebRiskService", - "full_name": "google.cloud.webrisk.v1.WebRiskService" - } - } - }, - "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-web_risk-v1/snippets/web_risk_service/compute_threat_list_diff.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/compute_threat_list_diff.rb deleted file mode 100644 index 7f5a53f82d9a..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/compute_threat_list_diff.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync] -require "google/cloud/web_risk/v1" - -## -# Snippet for the compute_threat_list_diff call in the WebRiskService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebRisk::V1::WebRiskService::Client#compute_threat_list_diff. -# -def compute_threat_list_diff - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new - - # Call the compute_threat_list_diff method. - result = client.compute_threat_list_diff request - - # The returned object is of type Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse. - p result -end -# [END webrisk_v1_generated_WebRiskService_ComputeThreatListDiff_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/create_submission.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/create_submission.rb deleted file mode 100644 index df7d3813ecdc..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/create_submission.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START webrisk_v1_generated_WebRiskService_CreateSubmission_sync] -require "google/cloud/web_risk/v1" - -## -# Snippet for the create_submission call in the WebRiskService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebRisk::V1::WebRiskService::Client#create_submission. -# -def create_submission - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new - - # Call the create_submission method. - result = client.create_submission request - - # The returned object is of type Google::Cloud::WebRisk::V1::Submission. - p result -end -# [END webrisk_v1_generated_WebRiskService_CreateSubmission_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_hashes.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_hashes.rb deleted file mode 100644 index dd666b618ada..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_hashes.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START webrisk_v1_generated_WebRiskService_SearchHashes_sync] -require "google/cloud/web_risk/v1" - -## -# Snippet for the search_hashes call in the WebRiskService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebRisk::V1::WebRiskService::Client#search_hashes. -# -def search_hashes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebRisk::V1::SearchHashesRequest.new - - # Call the search_hashes method. - result = client.search_hashes request - - # The returned object is of type Google::Cloud::WebRisk::V1::SearchHashesResponse. - p result -end -# [END webrisk_v1_generated_WebRiskService_SearchHashes_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_uris.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_uris.rb deleted file mode 100644 index f9689a938b35..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/search_uris.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START webrisk_v1_generated_WebRiskService_SearchUris_sync] -require "google/cloud/web_risk/v1" - -## -# Snippet for the search_uris call in the WebRiskService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebRisk::V1::WebRiskService::Client#search_uris. -# -def search_uris - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebRisk::V1::SearchUrisRequest.new - - # Call the search_uris method. - result = client.search_uris request - - # The returned object is of type Google::Cloud::WebRisk::V1::SearchUrisResponse. - p result -end -# [END webrisk_v1_generated_WebRiskService_SearchUris_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/submit_uri.rb b/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/submit_uri.rb deleted file mode 100644 index e9576276d743..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/snippets/web_risk_service/submit_uri.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 webrisk_v1_generated_WebRiskService_SubmitUri_sync] -require "google/cloud/web_risk/v1" - -## -# Snippet for the submit_uri call in the WebRiskService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebRisk::V1::WebRiskService::Client#submit_uri. -# -def submit_uri - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebRisk::V1::WebRiskService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebRisk::V1::SubmitUriRequest.new - - # Call the submit_uri method. - result = client.submit_uri request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END webrisk_v1_generated_WebRiskService_SubmitUri_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_operations_test.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_operations_test.rb deleted file mode 100644 index 2dbc348b4d90..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_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/webrisk/v1/webrisk_pb" -require "google/cloud/webrisk/v1/webrisk_services_pb" -require "google/cloud/web_risk/v1/web_risk_service" - -class ::Google::Cloud::WebRisk::V1::WebRiskService::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_paths_test.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_paths_test.rb deleted file mode 100644 index 4611e7b7e506..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_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/web_risk/v1/web_risk_service" - -class ::Google::Cloud::WebRisk::V1::WebRiskService::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_project_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_rest_test.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_rest_test.rb deleted file mode 100644 index a4b46ebc0c22..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_rest_test.rb +++ /dev/null @@ -1,377 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/webrisk/v1/webrisk_pb" -require "google/cloud/web_risk/v1/web_risk_service/rest" - - -class ::Google::Cloud::WebRisk::V1::WebRiskService::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_compute_threat_list_diff - # Create test objects. - client_result = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - threat_type = :THREAT_TYPE_UNSPECIFIED - version_token = "hello world" - constraints = {} - - compute_threat_list_diff_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_compute_threat_list_diff_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, compute_threat_list_diff_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.compute_threat_list_diff threat_type: threat_type, version_token: version_token, constraints: constraints do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.compute_threat_list_diff ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.compute_threat_list_diff(::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, compute_threat_list_diff_client_stub.call_count - end - end - end - - def test_search_uris - # Create test objects. - client_result = ::Google::Cloud::WebRisk::V1::SearchUrisResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - uri = "hello world" - threat_types = [:THREAT_TYPE_UNSPECIFIED] - - search_uris_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_search_uris_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_uris_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_uris({ uri: uri, threat_types: threat_types }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_uris uri: uri, threat_types: threat_types do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_uris ::Google::Cloud::WebRisk::V1::SearchUrisRequest.new(uri: uri, threat_types: threat_types) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_uris({ uri: uri, threat_types: threat_types }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_uris(::Google::Cloud::WebRisk::V1::SearchUrisRequest.new(uri: uri, threat_types: threat_types), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_uris_client_stub.call_count - end - end - end - - def test_search_hashes - # Create test objects. - client_result = ::Google::Cloud::WebRisk::V1::SearchHashesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - hash_prefix = "hello world" - threat_types = [:THREAT_TYPE_UNSPECIFIED] - - search_hashes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_search_hashes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_hashes_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_hashes hash_prefix: hash_prefix, threat_types: threat_types do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_hashes ::Google::Cloud::WebRisk::V1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_hashes(::Google::Cloud::WebRisk::V1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_hashes_client_stub.call_count - end - end - end - - def test_create_submission - # Create test objects. - client_result = ::Google::Cloud::WebRisk::V1::Submission.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - submission = {} - - create_submission_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_create_submission_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_submission_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_submission({ parent: parent, submission: submission }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_submission parent: parent, submission: submission do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_submission ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new(parent: parent, submission: submission) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_submission({ parent: parent, submission: submission }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_submission(::Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new(parent: parent, submission: submission), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_submission_client_stub.call_count - end - end - end - - def test_submit_uri - # Create test objects. - 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" - submission = {} - threat_info = {} - threat_discovery = {} - - submit_uri_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::ServiceStub.stub :transcode_submit_uri_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, submit_uri_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.submit_uri({ parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.submit_uri parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.submit_uri ::Google::Cloud::WebRisk::V1::SubmitUriRequest.new(parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.submit_uri({ parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.submit_uri(::Google::Cloud::WebRisk::V1::SubmitUriRequest.new(parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, submit_uri_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::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_test.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_test.rb deleted file mode 100644 index 1d3301dd6810..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/test/google/cloud/web_risk/v1/web_risk_service_test.rb +++ /dev/null @@ -1,429 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/webrisk/v1/webrisk_pb" -require "google/cloud/web_risk/v1/web_risk_service" - -class ::Google::Cloud::WebRisk::V1::WebRiskService::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_compute_threat_list_diff - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - threat_type = :THREAT_TYPE_UNSPECIFIED - version_token = "hello world" - constraints = {} - - compute_threat_list_diff_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :compute_threat_list_diff, name - assert_kind_of ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest, request - assert_equal :THREAT_TYPE_UNSPECIFIED, request["threat_type"] - assert_equal "hello world", request["version_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest::Constraints), request["constraints"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, compute_threat_list_diff_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.compute_threat_list_diff threat_type: threat_type, version_token: version_token, constraints: constraints do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.compute_threat_list_diff ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.compute_threat_list_diff(::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, compute_threat_list_diff_client_stub.call_rpc_count - end - end - - def test_search_uris - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebRisk::V1::SearchUrisResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - uri = "hello world" - threat_types = [:THREAT_TYPE_UNSPECIFIED] - - search_uris_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_uris, name - assert_kind_of ::Google::Cloud::WebRisk::V1::SearchUrisRequest, request - assert_equal "hello world", request["uri"] - assert_equal [:THREAT_TYPE_UNSPECIFIED], request["threat_types"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_uris_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_uris({ uri: uri, threat_types: threat_types }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_uris uri: uri, threat_types: threat_types do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_uris ::Google::Cloud::WebRisk::V1::SearchUrisRequest.new(uri: uri, threat_types: threat_types) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_uris({ uri: uri, threat_types: threat_types }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_uris(::Google::Cloud::WebRisk::V1::SearchUrisRequest.new(uri: uri, threat_types: threat_types), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_uris_client_stub.call_rpc_count - end - end - - def test_search_hashes - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebRisk::V1::SearchHashesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - hash_prefix = "hello world" - threat_types = [:THREAT_TYPE_UNSPECIFIED] - - search_hashes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_hashes, name - assert_kind_of ::Google::Cloud::WebRisk::V1::SearchHashesRequest, request - assert_equal "hello world", request["hash_prefix"] - assert_equal [:THREAT_TYPE_UNSPECIFIED], request["threat_types"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_hashes_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_hashes hash_prefix: hash_prefix, threat_types: threat_types do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_hashes ::Google::Cloud::WebRisk::V1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_hashes(::Google::Cloud::WebRisk::V1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_hashes_client_stub.call_rpc_count - end - end - - def test_create_submission - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebRisk::V1::Submission.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - submission = {} - - create_submission_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_submission, name - assert_kind_of ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::Submission), request["submission"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_submission_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_submission({ parent: parent, submission: submission }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_submission parent: parent, submission: submission do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_submission ::Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new(parent: parent, submission: submission) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_submission({ parent: parent, submission: submission }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_submission(::Google::Cloud::WebRisk::V1::CreateSubmissionRequest.new(parent: parent, submission: submission), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_submission_client_stub.call_rpc_count - end - end - - def test_submit_uri - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - submission = {} - threat_info = {} - threat_discovery = {} - - submit_uri_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :submit_uri, name - assert_kind_of ::Google::Cloud::WebRisk::V1::SubmitUriRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::Submission), request["submission"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::ThreatInfo), request["threat_info"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1::ThreatDiscovery), request["threat_discovery"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, submit_uri_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.submit_uri({ parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.submit_uri parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.submit_uri ::Google::Cloud::WebRisk::V1::SubmitUriRequest.new(parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.submit_uri({ parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.submit_uri(::Google::Cloud::WebRisk::V1::SubmitUriRequest.new(parent: parent, submission: submission, threat_info: threat_info, threat_discovery: threat_discovery), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, submit_uri_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::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::WebRisk::V1::WebRiskService::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::WebRisk::V1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::WebRisk::V1::WebRiskService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1/test/helper.rb b/owl-bot-staging/google-cloud-web_risk-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/.gitignore b/owl-bot-staging/google-cloud-web_risk-v1beta1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/.repo-metadata.json b/owl-bot-staging/google-cloud-web_risk-v1beta1/.repo-metadata.json deleted file mode 100644 index fe30af6aa1ab..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/.repo-metadata.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "api_id": "webrisk.googleapis.com", - "api_shortname": "webrisk", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1beta1/latest", - "distribution_name": "google-cloud-web_risk-v1beta1", - "is_cloud": true, - "language": "ruby", - "name": "webrisk", - "name_pretty": "Web Risk V1beta1 API", - "product_documentation": "https://cloud.google.com/web-risk", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. Note that google-cloud-web_risk-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_risk instead. See the readme for more details.", - "ruby-cloud-env-prefix": "WEBRISK", - "ruby-cloud-product-url": "https://cloud.google.com/web-risk", - "ruby-cloud-service-override": "WebRiskServiceV1Beta1=WebRiskService", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/.rubocop.yml b/owl-bot-staging/google-cloud-web_risk-v1beta1/.rubocop.yml deleted file mode 100644 index 259ed15aa523..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-web_risk-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-web_risk-v1beta1.rb" diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/.toys.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/.yardopts b/owl-bot-staging/google-cloud-web_risk-v1beta1/.yardopts deleted file mode 100644 index 70af59b70236..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Web Risk 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-web_risk-v1beta1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/AUTHENTICATION.md deleted file mode 100644 index 402db6205842..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-web_risk-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-web_risk-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/web_risk/v1beta1" - -client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/web_risk/v1beta1" - -::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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-web_risk-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/web_risk/v1beta1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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-web_risk-v1beta1/CHANGELOG.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/Gemfile b/owl-bot-staging/google-cloud-web_risk-v1beta1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/LICENSE.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/README.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/README.md deleted file mode 100644 index 523339a7d4ad..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Web Risk V1beta1 API - -API Client library for the Web Risk V1beta1 API - -Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Web Risk V1beta1 API. Most users should consider using -the main client gem, -[google-cloud-web_risk](https://rubygems.org/gems/google-cloud-web_risk). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-web_risk-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/webrisk.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/web_risk/v1beta1" - -client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new -request = ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new # (request fields as keyword arguments...) -response = client.compute_threat_list_diff request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1beta1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/web-risk) -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/web_risk/v1beta1" -require "logger" - -client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-web_risk`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-web_risk-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-web_risk`. -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-web_risk-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-web_risk-v1beta1/Rakefile b/owl-bot-staging/google-cloud-web_risk-v1beta1/Rakefile deleted file mode 100644 index c9ba69740a31..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WEBRISK_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WEBRISK_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WEBRISK_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 WEBRISK_TEST_PROJECT=test123 WEBRISK_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/web_risk/v1beta1/web_risk_service/credentials" - ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WEBRISK_PROJECT"] = project - ENV["WEBRISK_TEST_PROJECT"] = project - ENV["WEBRISK_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-web_risk-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-web_risk-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-web_risk-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-web_risk-v1beta1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-web_risk-v1beta1" - header "google-cloud-web_risk-v1beta1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-web_risk-v1beta1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-web_risk-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-web_risk-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-web_risk-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-web_risk-v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-web_risk-v1beta1/gapic_metadata.json deleted file mode 100644 index 5c1de79e5f6d..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.webrisk.v1beta1", - "libraryPackage": "::Google::Cloud::WebRisk::V1beta1", - "services": { - "WebRiskServiceV1Beta1": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client", - "rpcs": { - "ComputeThreatListDiff": { - "methods": [ - "compute_threat_list_diff" - ] - }, - "SearchUris": { - "methods": [ - "search_uris" - ] - }, - "SearchHashes": { - "methods": [ - "search_hashes" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/google-cloud-web_risk-v1beta1.gemspec b/owl-bot-staging/google-cloud-web_risk-v1beta1/google-cloud-web_risk-v1beta1.gemspec deleted file mode 100644 index e72c804552f5..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/google-cloud-web_risk-v1beta1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/web_risk/v1beta1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-web_risk-v1beta1" - gem.version = Google::Cloud::WebRisk::V1beta1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. Note that google-cloud-web_risk-v1beta1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_risk instead. See the readme for more details." - gem.summary = "API Client library for the Web Risk 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.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google-cloud-web_risk-v1beta1.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google-cloud-web_risk-v1beta1.rb deleted file mode 100644 index c49ea8ac5445..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google-cloud-web_risk-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/web_risk/v1beta1" diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1.rb deleted file mode 100644 index 05c5ff6acfc4..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/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/web_risk/v1beta1/web_risk_service" -require "google/cloud/web_risk/v1beta1/version" - -module Google - module Cloud - module WebRisk - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/web_risk/v1beta1" - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/web_risk/v1beta1" - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new - # - module V1beta1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta1", "_helpers.rb" -require "google/cloud/web_risk/v1beta1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/rest.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/rest.rb deleted file mode 100644 index ee8a517b8f9c..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/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/web_risk/v1beta1/web_risk_service/rest" -require "google/cloud/web_risk/v1beta1/version" - -module Google - module Cloud - module WebRisk - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/web_risk/v1beta1/rest" - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new - # - module V1beta1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/version.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/version.rb deleted file mode 100644 index 8cfd7d301ca1..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/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 WebRisk - module V1beta1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service.rb deleted file mode 100644 index 738b01841c1a..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/web_risk/v1beta1/version" - -require "google/cloud/web_risk/v1beta1/web_risk_service/credentials" -require "google/cloud/web_risk/v1beta1/web_risk_service/client" -require "google/cloud/web_risk/v1beta1/web_risk_service/rest" - -module Google - module Cloud - module WebRisk - module V1beta1 - ## - # Web Risk v1beta1 API defines an interface to detect malicious URLs on your - # website and in client applications. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/web_risk/v1beta1/web_risk_service" - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/web_risk/v1beta1/web_risk_service/rest" - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new - # - module WebRiskService - end - end - end - end -end - -helper_path = ::File.join __dir__, "web_risk_service", "helpers.rb" -require "google/cloud/web_risk/v1beta1/web_risk_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/client.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/client.rb deleted file mode 100644 index 88d026e5d188..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/client.rb +++ /dev/null @@ -1,662 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/webrisk/v1beta1/webrisk_pb" - -module Google - module Cloud - module WebRisk - module V1beta1 - module WebRiskService - ## - # Client for the WebRiskService service. - # - # Web Risk v1beta1 API defines an interface to detect malicious URLs on your - # website and in client applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :web_risk_service_stub - - ## - # Configure the WebRiskService Client class. - # - # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WebRiskService clients - # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "WebRisk", "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.compute_threat_list_diff.timeout = 600.0 - default_config.rpcs.compute_threat_list_diff.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_uris.timeout = 600.0 - default_config.rpcs.search_uris.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_hashes.timeout = 600.0 - default_config.rpcs.search_hashes.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 WebRiskService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @web_risk_service_stub.universe_domain - end - - ## - # Create a new WebRiskService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WebRiskService 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/webrisk/v1beta1/webrisk_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 - - @web_risk_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::WebRisk::V1beta1::WebRiskServiceV1Beta1::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 - ) - - @web_risk_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 - @web_risk_service_stub.logger - end - - # Service calls - - ## - # Gets the most recent threat list diffs. - # - # @overload compute_threat_list_diff(request, options = nil) - # Pass arguments to `compute_threat_list_diff` via a request object, either of type - # {::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil) - # Pass arguments to `compute_threat_list_diff` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param threat_type [::Google::Cloud::WebRisk::V1beta1::ThreatType] - # The ThreatList to update. - # @param version_token [::String] - # The current version token of the client for the requested list (the - # client version that was received from the last successful diff). - # @param constraints [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints, ::Hash] - # Required. The constraints associated with this request. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new - # - # # Call the compute_threat_list_diff method. - # result = client.compute_threat_list_diff request - # - # # The returned object is of type Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse. - # p result - # - def compute_threat_list_diff request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1beta1::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.compute_threat_list_diff.timeout, - metadata: metadata, - retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.call_rpc :compute_threat_list_diff, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # This method is used to check whether a URI is on a given threatList. - # - # @overload search_uris(request, options = nil) - # Pass arguments to `search_uris` via a request object, either of type - # {::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_uris(uri: nil, threat_types: nil) - # Pass arguments to `search_uris` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param uri [::String] - # Required. The URI to be checked for matches. - # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] - # Required. The ThreatLists to search in. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new - # - # # Call the search_uris method. - # result = client.search_uris request - # - # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchUrisResponse. - # p result - # - def search_uris request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest - - # Converts hash and nil to 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_uris.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1beta1::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.search_uris.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_uris.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.call_rpc :search_uris, request, 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 full hashes that match the requested hash prefix. - # This is used after a hash prefix is looked up in a threatList - # and there is a match. The client side threatList only holds partial hashes - # so the client must query this method to determine if there is a full - # hash match of a threat. - # - # @overload search_hashes(request, options = nil) - # Pass arguments to `search_hashes` via a request object, either of type - # {::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hashes(hash_prefix: nil, threat_types: nil) - # Pass arguments to `search_hashes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param hash_prefix [::String] - # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - # hash. For JSON requests, this field is base64-encoded. - # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] - # Required. The ThreatLists to search in. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new - # - # # Call the search_hashes method. - # result = client.search_hashes request - # - # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchHashesResponse. - # p result - # - def search_hashes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest - - # Converts hash and nil to 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_hashes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::V1beta1::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.search_hashes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.search_hashes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.call_rpc :search_hashes, request, 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 WebRiskService API. - # - # This class represents the configuration for WebRiskService, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # compute_threat_list_diff to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.compute_threat_list_diff.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.compute_threat_list_diff.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::WebRisk::V1beta1::WebRiskService::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "webrisk.googleapis.com" - - config_attr :endpoint, nil, ::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 WebRiskService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `compute_threat_list_diff` - # @return [::Gapic::Config::Method] - # - attr_reader :compute_threat_list_diff - ## - # RPC-specific configuration for `search_uris` - # @return [::Gapic::Config::Method] - # - attr_reader :search_uris - ## - # RPC-specific configuration for `search_hashes` - # @return [::Gapic::Config::Method] - # - attr_reader :search_hashes - - # @private - def initialize parent_rpcs = nil - compute_threat_list_diff_config = parent_rpcs.compute_threat_list_diff if parent_rpcs.respond_to? :compute_threat_list_diff - @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config - search_uris_config = parent_rpcs.search_uris if parent_rpcs.respond_to? :search_uris - @search_uris = ::Gapic::Config::Method.new search_uris_config - search_hashes_config = parent_rpcs.search_hashes if parent_rpcs.respond_to? :search_hashes - @search_hashes = ::Gapic::Config::Method.new search_hashes_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/credentials.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/credentials.rb deleted file mode 100644 index 36e4e8d572dc..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_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 WebRisk - module V1beta1 - module WebRiskService - # Credentials for the WebRiskService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "WEBRISK_CREDENTIALS", - "WEBRISK_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "WEBRISK_CREDENTIALS_JSON", - "WEBRISK_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-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest.rb deleted file mode 100644 index 641b01af11e5..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/web_risk/v1beta1/version" - -require "google/cloud/web_risk/v1beta1/web_risk_service/credentials" -require "google/cloud/web_risk/v1beta1/web_risk_service/rest/client" - -module Google - module Cloud - module WebRisk - module V1beta1 - ## - # Web Risk v1beta1 API defines an interface to detect malicious URLs on your - # website and in client applications. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/web_risk/v1beta1/web_risk_service/rest" - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new - # - module WebRiskService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/web_risk/v1beta1/web_risk_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/client.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/client.rb deleted file mode 100644 index 1709cfcb3b5f..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/client.rb +++ /dev/null @@ -1,622 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/webrisk/v1beta1/webrisk_pb" -require "google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub" - -module Google - module Cloud - module WebRisk - module V1beta1 - module WebRiskService - module Rest - ## - # REST client for the WebRiskService service. - # - # Web Risk v1beta1 API defines an interface to detect malicious URLs on your - # website and in client applications. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "webrisk.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :web_risk_service_stub - - ## - # Configure the WebRiskService Client class. - # - # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WebRiskService clients - # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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", "WebRisk", "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.compute_threat_list_diff.timeout = 600.0 - default_config.rpcs.compute_threat_list_diff.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_uris.timeout = 600.0 - default_config.rpcs.search_uris.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.search_hashes.timeout = 600.0 - default_config.rpcs.search_hashes.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 WebRiskService Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WebRisk::V1beta1::WebRiskService::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 - @web_risk_service_stub.universe_domain - end - - ## - # Create a new WebRiskService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WebRiskService 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 - - @web_risk_service_stub = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @web_risk_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 - @web_risk_service_stub.logger - end - - # Service calls - - ## - # Gets the most recent threat list diffs. - # - # @overload compute_threat_list_diff(request, options = nil) - # Pass arguments to `compute_threat_list_diff` via a request object, either of type - # {::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload compute_threat_list_diff(threat_type: nil, version_token: nil, constraints: nil) - # Pass arguments to `compute_threat_list_diff` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param threat_type [::Google::Cloud::WebRisk::V1beta1::ThreatType] - # The ThreatList to update. - # @param version_token [::String] - # The current version token of the client for the requested list (the - # client version that was received from the last successful diff). - # @param constraints [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints, ::Hash] - # Required. The constraints associated with this request. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new - # - # # Call the compute_threat_list_diff method. - # result = client.compute_threat_list_diff request - # - # # The returned object is of type Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse. - # p result - # - def compute_threat_list_diff request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.compute_threat_list_diff.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::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.compute_threat_list_diff.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.compute_threat_list_diff.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.compute_threat_list_diff request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # This method is used to check whether a URI is on a given threatList. - # - # @overload search_uris(request, options = nil) - # Pass arguments to `search_uris` via a request object, either of type - # {::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_uris(uri: nil, threat_types: nil) - # Pass arguments to `search_uris` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param uri [::String] - # Required. The URI to be checked for matches. - # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] - # Required. The ThreatLists to search in. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new - # - # # Call the search_uris method. - # result = client.search_uris request - # - # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchUrisResponse. - # p result - # - def search_uris request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest - - # Converts hash and nil to an 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_uris.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::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.search_uris.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_uris.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.search_uris request, 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 full hashes that match the requested hash prefix. - # This is used after a hash prefix is looked up in a threatList - # and there is a match. The client side threatList only holds partial hashes - # so the client must query this method to determine if there is a full - # hash match of a threat. - # - # @overload search_hashes(request, options = nil) - # Pass arguments to `search_hashes` via a request object, either of type - # {::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hashes(hash_prefix: nil, threat_types: nil) - # Pass arguments to `search_hashes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param hash_prefix [::String] - # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - # hash. For JSON requests, this field is base64-encoded. - # @param threat_types [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] - # Required. The ThreatLists to search in. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_risk/v1beta1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new - # - # # Call the search_hashes method. - # result = client.search_hashes request - # - # # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchHashesResponse. - # p result - # - def search_hashes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest - - # Converts hash and nil to an 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_hashes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebRisk::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.search_hashes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.search_hashes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_risk_service_stub.search_hashes request, 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 WebRiskService REST API. - # - # This class represents the configuration for WebRiskService 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::WebRisk::V1beta1::WebRiskService::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 - # # compute_threat_list_diff to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.compute_threat_list_diff.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.compute_threat_list_diff.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "webrisk.googleapis.com" - - config_attr :endpoint, nil, ::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 WebRiskService API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `compute_threat_list_diff` - # @return [::Gapic::Config::Method] - # - attr_reader :compute_threat_list_diff - ## - # RPC-specific configuration for `search_uris` - # @return [::Gapic::Config::Method] - # - attr_reader :search_uris - ## - # RPC-specific configuration for `search_hashes` - # @return [::Gapic::Config::Method] - # - attr_reader :search_hashes - - # @private - def initialize parent_rpcs = nil - compute_threat_list_diff_config = parent_rpcs.compute_threat_list_diff if parent_rpcs.respond_to? :compute_threat_list_diff - @compute_threat_list_diff = ::Gapic::Config::Method.new compute_threat_list_diff_config - search_uris_config = parent_rpcs.search_uris if parent_rpcs.respond_to? :search_uris - @search_uris = ::Gapic::Config::Method.new search_uris_config - search_hashes_config = parent_rpcs.search_hashes if parent_rpcs.respond_to? :search_hashes - @search_hashes = ::Gapic::Config::Method.new search_hashes_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub.rb deleted file mode 100644 index 6138c60c8d86..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/web_risk/v1beta1/web_risk_service/rest/service_stub.rb +++ /dev/null @@ -1,258 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/webrisk/v1beta1/webrisk_pb" - -module Google - module Cloud - module WebRisk - module V1beta1 - module WebRiskService - module Rest - ## - # REST service stub for the WebRiskService 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 compute_threat_list_diff REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse] - # A result object deserialized from the server's reply - def compute_threat_list_diff request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_compute_threat_list_diff_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "compute_threat_list_diff", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse.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_uris REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse] - # A result object deserialized from the server's reply - def search_uris request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_uris_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_uris", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse.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_hashes REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse] - # A result object deserialized from the server's reply - def search_hashes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_search_hashes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hashes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse.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 compute_threat_list_diff REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_compute_threat_list_diff_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/threatLists:computeDiff", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_uris REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest] - # 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_uris_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/uris:search", - matches: [] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the search_hashes REST call - # - # @param request_pb [::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest] - # 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_hashes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta1/hashes:search", - matches: [] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_pb.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_pb.rb deleted file mode 100644 index 6692eda9fc0f..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/webrisk/v1beta1/webrisk.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/cloud/webrisk/v1beta1/webrisk.proto\x12\x1cgoogle.cloud.webrisk.v1beta1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf2\x02\n\x1c\x43omputeThreatListDiffRequest\x12\x42\n\x0bthreat_type\x18\x01 \x01(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatTypeB\x03\xe0\x41\x02\x12\x15\n\rversion_token\x18\x02 \x01(\x0c\x12`\n\x0b\x63onstraints\x18\x03 \x01(\x0b\x32\x46.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.ConstraintsB\x03\xe0\x41\x02\x1a\x94\x01\n\x0b\x43onstraints\x12\x18\n\x10max_diff_entries\x18\x01 \x01(\x05\x12\x1c\n\x14max_database_entries\x18\x02 \x01(\x05\x12M\n\x16supported_compressions\x18\x03 \x03(\x0e\x32-.google.cloud.webrisk.v1beta1.CompressionType\"\x9a\x04\n\x1d\x43omputeThreatListDiffResponse\x12_\n\rresponse_type\x18\x04 \x01(\x0e\x32H.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType\x12\x45\n\tadditions\x18\x05 \x01(\x0b\x32\x32.google.cloud.webrisk.v1beta1.ThreatEntryAdditions\x12\x43\n\x08removals\x18\x06 \x01(\x0b\x32\x31.google.cloud.webrisk.v1beta1.ThreatEntryRemovals\x12\x19\n\x11new_version_token\x18\x07 \x01(\x0c\x12V\n\x08\x63hecksum\x18\x08 \x01(\x0b\x32\x44.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum\x12\x39\n\x15recommended_next_diff\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x1a\n\x08\x43hecksum\x12\x0e\n\x06sha256\x18\x01 \x01(\x0c\"B\n\x0cResponseType\x12\x1d\n\x19RESPONSE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x44IFF\x10\x01\x12\t\n\x05RESET\x10\x02\"j\n\x11SearchUrisRequest\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x0cthreat_types\x18\x02 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatTypeB\x03\xe0\x41\x02\"\xde\x01\n\x12SearchUrisResponse\x12J\n\x06threat\x18\x01 \x01(\x0b\x32:.google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri\x1a|\n\tThreatUri\x12>\n\x0cthreat_types\x18\x01 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatType\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"o\n\x13SearchHashesRequest\x12\x13\n\x0bhash_prefix\x18\x01 \x01(\x0c\x12\x43\n\x0cthreat_types\x18\x02 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatTypeB\x03\xe0\x41\x02\"\xae\x02\n\x14SearchHashesResponse\x12N\n\x07threats\x18\x01 \x03(\x0b\x32=.google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash\x12\x38\n\x14negative_expire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1a\x8b\x01\n\nThreatHash\x12>\n\x0cthreat_types\x18\x01 \x03(\x0e\x32(.google.cloud.webrisk.v1beta1.ThreatType\x12\x0c\n\x04hash\x18\x02 \x01(\x0c\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x99\x01\n\x14ThreatEntryAdditions\x12;\n\nraw_hashes\x18\x01 \x03(\x0b\x32\'.google.cloud.webrisk.v1beta1.RawHashes\x12\x44\n\x0brice_hashes\x18\x02 \x01(\x0b\x32/.google.cloud.webrisk.v1beta1.RiceDeltaEncoding\"\x9b\x01\n\x13ThreatEntryRemovals\x12=\n\x0braw_indices\x18\x01 \x01(\x0b\x32(.google.cloud.webrisk.v1beta1.RawIndices\x12\x45\n\x0crice_indices\x18\x02 \x01(\x0b\x32/.google.cloud.webrisk.v1beta1.RiceDeltaEncoding\"\x1d\n\nRawIndices\x12\x0f\n\x07indices\x18\x01 \x03(\x05\"4\n\tRawHashes\x12\x13\n\x0bprefix_size\x18\x01 \x01(\x05\x12\x12\n\nraw_hashes\x18\x02 \x01(\x0c\"k\n\x11RiceDeltaEncoding\x12\x13\n\x0b\x66irst_value\x18\x01 \x01(\x03\x12\x16\n\x0erice_parameter\x18\x02 \x01(\x05\x12\x13\n\x0b\x65ntry_count\x18\x03 \x01(\x05\x12\x14\n\x0c\x65ncoded_data\x18\x04 \x01(\x0c*e\n\nThreatType\x12\x1b\n\x17THREAT_TYPE_UNSPECIFIED\x10\x00\x12\x0b\n\x07MALWARE\x10\x01\x12\x16\n\x12SOCIAL_ENGINEERING\x10\x02\x12\x15\n\x11UNWANTED_SOFTWARE\x10\x03*F\n\x0f\x43ompressionType\x12 \n\x1c\x43OMPRESSION_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03RAW\x10\x01\x12\x08\n\x04RICE\x10\x02\x32\x9e\x05\n\x15WebRiskServiceV1Beta1\x12\xe2\x01\n\x15\x43omputeThreatListDiff\x12:.google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest\x1a;.google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse\"P\xda\x41%threat_type,version_token,constraints\x82\xd3\xe4\x93\x02\"\x12 /v1beta1/threatLists:computeDiff\x12\xa0\x01\n\nSearchUris\x12/.google.cloud.webrisk.v1beta1.SearchUrisRequest\x1a\x30.google.cloud.webrisk.v1beta1.SearchUrisResponse\"/\xda\x41\x10uri,threat_types\x82\xd3\xe4\x93\x02\x16\x12\x14/v1beta1/uris:search\x12\xb0\x01\n\x0cSearchHashes\x12\x31.google.cloud.webrisk.v1beta1.SearchHashesRequest\x1a\x32.google.cloud.webrisk.v1beta1.SearchHashesResponse\"9\xda\x41\x18hash_prefix,threat_types\x82\xd3\xe4\x93\x02\x18\x12\x16/v1beta1/hashes:search\x1aJ\xca\x41\x16webrisk.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xcf\x01\n\x1a\x63om.google.webrisk.v1beta1B\x0cWebRiskProtoP\x01Z:cloud.google.com/go/webrisk/apiv1beta1/webriskpb;webriskpb\xa2\x02\x04GCWR\xaa\x02\x1cGoogle.Cloud.WebRisk.V1Beta1\xca\x02\x1cGoogle\\Cloud\\WebRisk\\V1beta1\xea\x02\x1fGoogle::Cloud::WebRisk::V1beta1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebRisk - module V1beta1 - ComputeThreatListDiffRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest").msgclass - ComputeThreatListDiffRequest::Constraints = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffRequest.Constraints").msgclass - ComputeThreatListDiffResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse").msgclass - ComputeThreatListDiffResponse::Checksum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.Checksum").msgclass - ComputeThreatListDiffResponse::ResponseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ComputeThreatListDiffResponse.ResponseType").enummodule - SearchUrisRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchUrisRequest").msgclass - SearchUrisResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchUrisResponse").msgclass - SearchUrisResponse::ThreatUri = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchUrisResponse.ThreatUri").msgclass - SearchHashesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchHashesRequest").msgclass - SearchHashesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchHashesResponse").msgclass - SearchHashesResponse::ThreatHash = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.SearchHashesResponse.ThreatHash").msgclass - ThreatEntryAdditions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ThreatEntryAdditions").msgclass - ThreatEntryRemovals = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ThreatEntryRemovals").msgclass - RawIndices = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.RawIndices").msgclass - RawHashes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.RawHashes").msgclass - RiceDeltaEncoding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.RiceDeltaEncoding").msgclass - ThreatType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.ThreatType").enummodule - CompressionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.webrisk.v1beta1.CompressionType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_services_pb.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_services_pb.rb deleted file mode 100644 index 660324d80adb..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/lib/google/cloud/webrisk/v1beta1/webrisk_services_pb.rb +++ /dev/null @@ -1,55 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/webrisk/v1beta1/webrisk.proto for package 'Google.Cloud.WebRisk.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/webrisk/v1beta1/webrisk_pb' - -module Google - module Cloud - module WebRisk - module V1beta1 - module WebRiskServiceV1Beta1 - # Web Risk v1beta1 API defines an interface to detect malicious URLs on your - # website and in client applications. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1' - - # Gets the most recent threat list diffs. - rpc :ComputeThreatListDiff, ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse - # This method is used to check whether a URI is on a given threatList. - rpc :SearchUris, ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, ::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse - # Gets the full hashes that match the requested hash prefix. - # This is used after a hash prefix is looked up in a threatList - # and there is a match. The client side threatList only holds partial hashes - # so the client must query this method to determine if there is a full - # hash match of a threat. - rpc :SearchHashes, ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, ::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/README.md b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/README.md deleted file mode 100644 index a908c3711de1..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Web Risk 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-web_risk-v1beta1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/proto_docs/google/cloud/webrisk/v1beta1/webrisk.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/cloud/webrisk/v1beta1/webrisk.rb deleted file mode 100644 index c8e4013b59f2..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/cloud/webrisk/v1beta1/webrisk.rb +++ /dev/null @@ -1,307 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebRisk - module V1beta1 - # Describes an API diff request. - # @!attribute [rw] threat_type - # @return [::Google::Cloud::WebRisk::V1beta1::ThreatType] - # The ThreatList to update. - # @!attribute [rw] version_token - # @return [::String] - # The current version token of the client for the requested list (the - # client version that was received from the last successful diff). - # @!attribute [rw] constraints - # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints] - # Required. The constraints associated with this request. - class ComputeThreatListDiffRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The constraints for this diff. - # @!attribute [rw] max_diff_entries - # @return [::Integer] - # The maximum size in number of entries. The diff will not contain more - # entries than this value. This should be a power of 2 between 2**10 and - # 2**20. If zero, no diff size limit is set. - # @!attribute [rw] max_database_entries - # @return [::Integer] - # Sets the maximum number of entries that the client is willing to have - # in the local database. This should be a power of 2 between 2**10 and - # 2**20. If zero, no database size limit is set. - # @!attribute [rw] supported_compressions - # @return [::Array<::Google::Cloud::WebRisk::V1beta1::CompressionType>] - # The compression types supported by the client. - class Constraints - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] response_type - # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::ResponseType] - # The type of response. This may indicate that an action must be taken by the - # client when the response is received. - # @!attribute [rw] additions - # @return [::Google::Cloud::WebRisk::V1beta1::ThreatEntryAdditions] - # A set of entries to add to a local threat type's list. - # @!attribute [rw] removals - # @return [::Google::Cloud::WebRisk::V1beta1::ThreatEntryRemovals] - # A set of entries to remove from a local threat type's list. - # This field may be empty. - # @!attribute [rw] new_version_token - # @return [::String] - # The new opaque client version token. - # @!attribute [rw] checksum - # @return [::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse::Checksum] - # The expected SHA256 hash of the client state; that is, of the sorted list - # of all hashes present in the database after applying the provided diff. - # If the client state doesn't match the expected state, the client must - # disregard this diff and retry later. - # @!attribute [rw] recommended_next_diff - # @return [::Google::Protobuf::Timestamp] - # The soonest the client should wait before issuing any diff - # request. Querying sooner is unlikely to produce a meaningful diff. - # Waiting longer is acceptable considering the use case. - # If this field is not set clients may update as soon as they want. - class ComputeThreatListDiffResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The expected state of a client's local database. - # @!attribute [rw] sha256 - # @return [::String] - # The SHA256 hash of the client state; that is, of the sorted list of all - # hashes present in the database. - class Checksum - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of response sent to the client. - module ResponseType - # Unknown. - RESPONSE_TYPE_UNSPECIFIED = 0 - - # Partial updates are applied to the client's existing local database. - DIFF = 1 - - # Full updates resets the client's entire local database. This means - # that either the client had no state, was seriously out-of-date, - # or the client is believed to be corrupt. - RESET = 2 - end - end - - # Request to check URI entries against threatLists. - # @!attribute [rw] uri - # @return [::String] - # Required. The URI to be checked for matches. - # @!attribute [rw] threat_types - # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] - # Required. The ThreatLists to search in. - class SearchUrisRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] threat - # @return [::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse::ThreatUri] - # The threat list matches. This may be empty if the URI is on no list. - class SearchUrisResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains threat information on a matching uri. - # @!attribute [rw] threat_types - # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] - # The ThreatList this threat belongs to. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # The cache lifetime for the returned match. Clients must not cache this - # response past this timestamp to avoid false positives. - class ThreatUri - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request to return full hashes matched by the provided hash prefixes. - # @!attribute [rw] hash_prefix - # @return [::String] - # A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 - # hash. For JSON requests, this field is base64-encoded. - # @!attribute [rw] threat_types - # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] - # Required. The ThreatLists to search in. - class SearchHashesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] threats - # @return [::Array<::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse::ThreatHash>] - # The full hashes that matched the requested prefixes. - # The hash will be populated in the key. - # @!attribute [rw] negative_expire_time - # @return [::Google::Protobuf::Timestamp] - # For requested entities that did not match the threat list, how long to - # cache the response until. - class SearchHashesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains threat information on a matching hash. - # @!attribute [rw] threat_types - # @return [::Array<::Google::Cloud::WebRisk::V1beta1::ThreatType>] - # The ThreatList this threat belongs to. - # This must contain at least one entry. - # @!attribute [rw] hash - # @return [::String] - # A 32 byte SHA256 hash. This field is in binary format. For JSON - # requests, hashes are base64-encoded. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # The cache lifetime for the returned match. Clients must not cache this - # response past this timestamp to avoid false positives. - class ThreatHash - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Contains the set of entries to add to a local database. - # May contain a combination of compressed and raw data in a single response. - # @!attribute [rw] raw_hashes - # @return [::Array<::Google::Cloud::WebRisk::V1beta1::RawHashes>] - # The raw SHA256-formatted entries. - # Repeated to allow returning sets of hashes with different prefix sizes. - # @!attribute [rw] rice_hashes - # @return [::Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding] - # The encoded 4-byte prefixes of SHA256-formatted entries, using a - # Golomb-Rice encoding. The hashes are converted to uint32, sorted in - # ascending order, then delta encoded and stored as encoded_data. - class ThreatEntryAdditions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains the set of entries to remove from a local database. - # @!attribute [rw] raw_indices - # @return [::Google::Cloud::WebRisk::V1beta1::RawIndices] - # The raw removal indices for a local list. - # @!attribute [rw] rice_indices - # @return [::Google::Cloud::WebRisk::V1beta1::RiceDeltaEncoding] - # The encoded local, lexicographically-sorted list indices, using a - # Golomb-Rice encoding. Used for sending compressed removal indices. The - # removal indices (uint32) are sorted in ascending order, then delta encoded - # and stored as encoded_data. - class ThreatEntryRemovals - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of raw indices to remove from a local list. - # @!attribute [rw] indices - # @return [::Array<::Integer>] - # The indices to remove from a lexicographically-sorted local list. - class RawIndices - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The uncompressed threat entries in hash format. - # Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 - # bytes, but some hashes are lengthened if they collide with the hash of a - # popular URI. - # - # Used for sending ThreatEntryAdditons to clients that do not support - # compression, or when sending non-4-byte hashes to clients that do support - # compression. - # @!attribute [rw] prefix_size - # @return [::Integer] - # The number of bytes for each prefix encoded below. This field can be - # anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). - # @!attribute [rw] raw_hashes - # @return [::String] - # The hashes, in binary format, concatenated into one long string. Hashes are - # sorted in lexicographic order. For JSON API users, hashes are - # base64-encoded. - class RawHashes - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or - # compressed removal indices. - # @!attribute [rw] first_value - # @return [::Integer] - # The offset of the first entry in the encoded data, or, if only a single - # integer was encoded, that single integer's value. If the field is empty or - # missing, assume zero. - # @!attribute [rw] rice_parameter - # @return [::Integer] - # The Golomb-Rice parameter, which is a number between 2 and 28. This field - # is missing (that is, zero) if `num_entries` is zero. - # @!attribute [rw] entry_count - # @return [::Integer] - # The number of entries that are delta encoded in the encoded data. If only a - # single integer was encoded, this will be zero and the single value will be - # stored in `first_value`. - # @!attribute [rw] encoded_data - # @return [::String] - # The encoded deltas that are encoded using the Golomb-Rice coder. - class RiceDeltaEncoding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of threat. This maps dirrectly to the threat list a threat may - # belong to. - module ThreatType - # Unknown. - THREAT_TYPE_UNSPECIFIED = 0 - - # Malware targeting any platform. - MALWARE = 1 - - # Social engineering targeting any platform. - SOCIAL_ENGINEERING = 2 - - # Unwanted software targeting any platform. - UNWANTED_SOFTWARE = 3 - end - - # The ways in which threat entry sets can be compressed. - module CompressionType - # Unknown. - COMPRESSION_TYPE_UNSPECIFIED = 0 - - # Raw, uncompressed data. - RAW = 1 - - # Rice-Golomb encoded data. - RICE = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/Gemfile b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/Gemfile deleted file mode 100644 index 9e1e8937a0c4..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-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-web_risk-v1beta1", path: "../" -else - gem "google-cloud-web_risk-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-web_risk-v1beta1/snippets/snippet_metadata_google.cloud.webrisk.v1beta1.json b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/snippet_metadata_google.cloud.webrisk.v1beta1.json deleted file mode 100644 index 5fc454a190f6..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/snippet_metadata_google.cloud.webrisk.v1beta1.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-web_risk-v1beta1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.webrisk.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "region_tag": "webrisk_v1beta1_generated_WebRiskService_ComputeThreatListDiff_sync", - "title": "Snippet for the compute_threat_list_diff call in the WebRiskService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#compute_threat_list_diff.", - "file": "web_risk_service/compute_threat_list_diff.rb", - "language": "RUBY", - "client_method": { - "short_name": "compute_threat_list_diff", - "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#compute_threat_list_diff", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse", - "client": { - "short_name": "WebRiskService::Client", - "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client" - }, - "method": { - "short_name": "ComputeThreatListDiff", - "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.ComputeThreatListDiff", - "service": { - "short_name": "WebRiskService", - "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "webrisk_v1beta1_generated_WebRiskService_SearchUris_sync", - "title": "Snippet for the search_uris call in the WebRiskService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_uris.", - "file": "web_risk_service/search_uris.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_uris", - "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_uris", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse", - "client": { - "short_name": "WebRiskService::Client", - "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client" - }, - "method": { - "short_name": "SearchUris", - "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchUris", - "service": { - "short_name": "WebRiskService", - "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "webrisk_v1beta1_generated_WebRiskService_SearchHashes_sync", - "title": "Snippet for the search_hashes call in the WebRiskService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_hashes.", - "file": "web_risk_service/search_hashes.rb", - "language": "RUBY", - "client_method": { - "short_name": "search_hashes", - "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_hashes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse", - "client": { - "short_name": "WebRiskService::Client", - "full_name": "::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client" - }, - "method": { - "short_name": "SearchHashes", - "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1.SearchHashes", - "service": { - "short_name": "WebRiskService", - "full_name": "google.cloud.webrisk.v1beta1.WebRiskServiceV1Beta1" - } - } - }, - "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-web_risk-v1beta1/snippets/web_risk_service/compute_threat_list_diff.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/compute_threat_list_diff.rb deleted file mode 100644 index 317d12f0e694..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/compute_threat_list_diff.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START webrisk_v1beta1_generated_WebRiskService_ComputeThreatListDiff_sync] -require "google/cloud/web_risk/v1beta1" - -## -# Snippet for the compute_threat_list_diff call in the WebRiskService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#compute_threat_list_diff. -# -def compute_threat_list_diff - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new - - # Call the compute_threat_list_diff method. - result = client.compute_threat_list_diff request - - # The returned object is of type Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse. - p result -end -# [END webrisk_v1beta1_generated_WebRiskService_ComputeThreatListDiff_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_hashes.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_hashes.rb deleted file mode 100644 index 49e9992e8e2a..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_hashes.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START webrisk_v1beta1_generated_WebRiskService_SearchHashes_sync] -require "google/cloud/web_risk/v1beta1" - -## -# Snippet for the search_hashes call in the WebRiskService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_hashes. -# -def search_hashes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new - - # Call the search_hashes method. - result = client.search_hashes request - - # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchHashesResponse. - p result -end -# [END webrisk_v1beta1_generated_WebRiskService_SearchHashes_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_uris.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_uris.rb deleted file mode 100644 index 096ea0fa663b..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/snippets/web_risk_service/search_uris.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START webrisk_v1beta1_generated_WebRiskService_SearchUris_sync] -require "google/cloud/web_risk/v1beta1" - -## -# Snippet for the search_uris call in the WebRiskService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebRisk::V1beta1::WebRiskService::Client#search_uris. -# -def search_uris - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new - - # Call the search_uris method. - result = client.search_uris request - - # The returned object is of type Google::Cloud::WebRisk::V1beta1::SearchUrisResponse. - p result -end -# [END webrisk_v1beta1_generated_WebRiskService_SearchUris_sync] diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_rest_test.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_rest_test.rb deleted file mode 100644 index 7c9f01b165dd..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_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/webrisk/v1beta1/webrisk_pb" -require "google/cloud/web_risk/v1beta1/web_risk_service/rest" - - -class ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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_compute_threat_list_diff - # Create test objects. - client_result = ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - threat_type = :THREAT_TYPE_UNSPECIFIED - version_token = "hello world" - constraints = {} - - compute_threat_list_diff_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::ServiceStub.stub :transcode_compute_threat_list_diff_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, compute_threat_list_diff_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.compute_threat_list_diff threat_type: threat_type, version_token: version_token, constraints: constraints do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.compute_threat_list_diff ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.compute_threat_list_diff(::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, compute_threat_list_diff_client_stub.call_count - end - end - end - - def test_search_uris - # Create test objects. - client_result = ::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - uri = "hello world" - threat_types = [:THREAT_TYPE_UNSPECIFIED] - - search_uris_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::ServiceStub.stub :transcode_search_uris_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_uris_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_uris({ uri: uri, threat_types: threat_types }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_uris uri: uri, threat_types: threat_types do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_uris ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new(uri: uri, threat_types: threat_types) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_uris({ uri: uri, threat_types: threat_types }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_uris(::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new(uri: uri, threat_types: threat_types), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_uris_client_stub.call_count - end - end - end - - def test_search_hashes - # Create test objects. - client_result = ::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - hash_prefix = "hello world" - threat_types = [:THREAT_TYPE_UNSPECIFIED] - - search_hashes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::ServiceStub.stub :transcode_search_hashes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, search_hashes_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.search_hashes hash_prefix: hash_prefix, threat_types: threat_types do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.search_hashes ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.search_hashes(::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, search_hashes_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::WebRisk::V1beta1::WebRiskService::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::WebRisk::V1beta1::WebRiskService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_test.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_test.rb deleted file mode 100644 index 51da0e186f5b..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/test/google/cloud/web_risk/v1beta1/web_risk_service_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/cloud/webrisk/v1beta1/webrisk_pb" -require "google/cloud/web_risk/v1beta1/web_risk_service" - -class ::Google::Cloud::WebRisk::V1beta1::WebRiskService::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_compute_threat_list_diff - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - threat_type = :THREAT_TYPE_UNSPECIFIED - version_token = "hello world" - constraints = {} - - compute_threat_list_diff_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :compute_threat_list_diff, name - assert_kind_of ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest, request - assert_equal :THREAT_TYPE_UNSPECIFIED, request["threat_type"] - assert_equal "hello world", request["version_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest::Constraints), request["constraints"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, compute_threat_list_diff_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.compute_threat_list_diff threat_type: threat_type, version_token: version_token, constraints: constraints do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.compute_threat_list_diff ::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.compute_threat_list_diff({ threat_type: threat_type, version_token: version_token, constraints: constraints }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.compute_threat_list_diff(::Google::Cloud::WebRisk::V1beta1::ComputeThreatListDiffRequest.new(threat_type: threat_type, version_token: version_token, constraints: constraints), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, compute_threat_list_diff_client_stub.call_rpc_count - end - end - - def test_search_uris - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebRisk::V1beta1::SearchUrisResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - uri = "hello world" - threat_types = [:THREAT_TYPE_UNSPECIFIED] - - search_uris_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_uris, name - assert_kind_of ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest, request - assert_equal "hello world", request["uri"] - assert_equal [:THREAT_TYPE_UNSPECIFIED], request["threat_types"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_uris_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_uris({ uri: uri, threat_types: threat_types }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_uris uri: uri, threat_types: threat_types do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_uris ::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new(uri: uri, threat_types: threat_types) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_uris({ uri: uri, threat_types: threat_types }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_uris(::Google::Cloud::WebRisk::V1beta1::SearchUrisRequest.new(uri: uri, threat_types: threat_types), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_uris_client_stub.call_rpc_count - end - end - - def test_search_hashes - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebRisk::V1beta1::SearchHashesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - hash_prefix = "hello world" - threat_types = [:THREAT_TYPE_UNSPECIFIED] - - search_hashes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :search_hashes, name - assert_kind_of ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest, request - assert_equal "hello world", request["hash_prefix"] - assert_equal [:THREAT_TYPE_UNSPECIFIED], request["threat_types"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, search_hashes_client_stub do - # Create client - client = ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.search_hashes hash_prefix: hash_prefix, threat_types: threat_types do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.search_hashes ::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.search_hashes({ hash_prefix: hash_prefix, threat_types: threat_types }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.search_hashes(::Google::Cloud::WebRisk::V1beta1::SearchHashesRequest.new(hash_prefix: hash_prefix, threat_types: threat_types), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, search_hashes_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::WebRisk::V1beta1::WebRiskService::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::WebRisk::V1beta1::WebRiskService::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::WebRisk::V1beta1::WebRiskService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::WebRisk::V1beta1::WebRiskService::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk-v1beta1/test/helper.rb b/owl-bot-staging/google-cloud-web_risk-v1beta1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-web_risk-v1beta1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_risk/.gitignore b/owl-bot-staging/google-cloud-web_risk/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-web_risk/.repo-metadata.json b/owl-bot-staging/google-cloud-web_risk/.repo-metadata.json deleted file mode 100644 index d5eced76f00c..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "webrisk.googleapis.com", - "api_shortname": "webrisk", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk/latest", - "distribution_name": "google-cloud-web_risk", - "is_cloud": true, - "language": "ruby", - "name": "webrisk", - "name_pretty": "Web Risk API", - "product_documentation": "https://cloud.google.com/web-risk", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources.", - "ruby-cloud-env-prefix": "WEBRISK", - "ruby-cloud-product-url": "https://cloud.google.com/web-risk", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-web_risk/.rubocop.yml b/owl-bot-staging/google-cloud-web_risk/.rubocop.yml deleted file mode 100644 index 636c866d7d05..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-web_risk.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-cloud-web_risk.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-web_risk/.toys.rb b/owl-bot-staging/google-cloud-web_risk/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/.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-web_risk/.yardopts b/owl-bot-staging/google-cloud-web_risk/.yardopts deleted file mode 100644 index 3da3d7a2bcef..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Web Risk API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-web_risk/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_risk/AUTHENTICATION.md deleted file mode 100644 index 74419dfaba23..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-web_risk 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-web_risk 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/web_risk" - -client = Google::Cloud::WebRisk.web_risk_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/web_risk" - -Google::Cloud::WebRisk.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::WebRisk.web_risk_service -``` - -### Environment Variables - -You can also use an environment variable to provide a JSON credentials file. -The environment variable can contain a path to the credentials file or, for -environments such as Docker containers where writing files is not encouraged, -you can include the credentials file itself. - -The JSON file can contain credentials created for -[workload identity federation](https://cloud.google.com/iam/docs/workload-identity-federation), -[workforce identity federation](https://cloud.google.com/iam/docs/workforce-identity-federation), or a -[service account key](https://cloud.google.com/docs/authentication/provide-credentials-adc#local-key). - -Note: Service account keys are a security risk if not managed correctly. You should -[choose a more secure alternative to service account keys](https://cloud.google.com/docs/authentication#auth-decision-tree) -whenever possible. - -The environment variables that google-cloud-web_risk -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/web_risk" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::WebRisk.web_risk_service -``` - -### Local ADC file - -You can set up a local ADC file with your user credentials for authentication during -development. If credentials are not provided in code or in environment variables, -then the local ADC credentials are discovered. - -Follow the steps in [Quickstart](#quickstart) to set up a local ADC file. - -### Google Cloud Platform environments - -When running on Google Cloud Platform (GCP), including Google Compute Engine -(GCE), Google Kubernetes Engine (GKE), Google App Engine (GAE), Google Cloud -Functions (GCF) and Cloud Run, credentials are retrieved from the attached -service account automatically. Code should be written as if already authenticated. - -For more information, see -[Set up ADC for Google Cloud services](https://cloud.google.com/docs/authentication/provide-credentials-adc#attached-sa). diff --git a/owl-bot-staging/google-cloud-web_risk/CHANGELOG.md b/owl-bot-staging/google-cloud-web_risk/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-web_risk/Gemfile b/owl-bot-staging/google-cloud-web_risk/Gemfile deleted file mode 100644 index 07fc9c47d630..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-web_risk-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-web_risk.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_risk/LICENSE.md b/owl-bot-staging/google-cloud-web_risk/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/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-web_risk/README.md b/owl-bot-staging/google-cloud-web_risk/README.md deleted file mode 100644 index cc79f845f222..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Web Risk API - -API Client library for the Web Risk API - -Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-web_risk-v*`. -The gem `google-cloud-web_risk` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk/latest) -for this library, google-cloud-web_risk, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-web_risk-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/web-risk) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-web_risk -``` - -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/webrisk.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/web_risk" - -client = Google::Cloud::WebRisk.web_risk_service -request = ::Google::Cloud::WebRisk::V1::ComputeThreatListDiffRequest.new # (request fields as keyword arguments...) -response = client.compute_threat_list_diff request -``` - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-web_risk-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-web_risk`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-web_risk-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-web_risk`. -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-web_risk-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-web_risk/Rakefile b/owl-bot-staging/google-cloud-web_risk/Rakefile deleted file mode 100644 index aa92a55510f4..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-web_risk acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WEBRISK_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WEBRISK_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WEBRISK_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 WEBRISK_TEST_PROJECT=test123 WEBRISK_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/web_risk/v1/web_risk_service/credentials" - ::Google::Cloud::WebRisk::V1::WebRiskService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WEBRISK_PROJECT"] = project - ENV["WEBRISK_TEST_PROJECT"] = project - ENV["WEBRISK_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-web_risk 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-web_risk 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-web_risk 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-web_risk gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-web_risk" - header "google-cloud-web_risk rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-web_risk yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-web_risk 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-web_risk 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-web_risk 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-web_risk/google-cloud-web_risk.gemspec b/owl-bot-staging/google-cloud-web_risk/google-cloud-web_risk.gemspec deleted file mode 100644 index 9601bd3a78d1..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/google-cloud-web_risk.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/web_risk/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-web_risk" - gem.version = Google::Cloud::WebRisk::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources." - gem.summary = "API Client library for the Web Risk API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-web_risk-v1", "~> 1.2" -end diff --git a/owl-bot-staging/google-cloud-web_risk/lib/google-cloud-web_risk.rb b/owl-bot-staging/google-cloud-web_risk/lib/google-cloud-web_risk.rb deleted file mode 100644 index 46ec1430a2e2..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/lib/google-cloud-web_risk.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/web_risk" unless defined? Google::Cloud::WebRisk::VERSION diff --git a/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk.rb b/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk.rb deleted file mode 100644 index 03ef36009241..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk.rb +++ /dev/null @@ -1,157 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/web_risk/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :web_risk do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module WebRisk - ## - # Create a new client object for WebRiskService. - # - # By default, this returns an instance of - # [Google::Cloud::WebRisk::V1::WebRiskService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-web_risk-v1/latest/Google-Cloud-WebRisk-V1-WebRiskService-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the WebRiskService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the WebRiskService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::WebRisk.web_risk_service_available?}. - # - # ## About WebRiskService - # - # Web Risk API defines an interface to detect malicious URLs on your - # website and in client applications. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.web_risk_service version: :v1, transport: :grpc, &block - require "google/cloud/web_risk/#{version.to_s.downcase}" - - package_name = Google::Cloud::WebRisk - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::WebRisk.const_get(package_name).const_get(:WebRiskService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the WebRiskService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::WebRisk.web_risk_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the WebRiskService service, - # or if the versioned client gem needs an update to support the WebRiskService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.web_risk_service_available? version: :v1, transport: :grpc - require "google/cloud/web_risk/#{version.to_s.downcase}" - package_name = Google::Cloud::WebRisk - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::WebRisk.const_get package_name - return false unless service_module.const_defined? :WebRiskService - service_module = service_module.const_get :WebRiskService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-web_risk library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.web_risk if block_given? - - ::Google::Cloud.configure.web_risk - end - end - end -end - -helper_path = ::File.join __dir__, "web_risk", "helpers.rb" -require "google/cloud/web_risk/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb b/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb deleted file mode 100644 index a05c8a144a4f..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/lib/google/cloud/web_risk/version.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebRisk - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/client_test.rb b/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/client_test.rb deleted file mode 100644 index 3764e7e77b26..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/web_risk" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::WebRisk::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_web_risk_service_grpc - skip unless Google::Cloud::WebRisk.web_risk_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::WebRisk.web_risk_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::WebRisk::V1::WebRiskService::Client, client - end - end - - def test_web_risk_service_rest - skip unless Google::Cloud::WebRisk.web_risk_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::WebRisk.web_risk_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::WebRisk::V1::WebRiskService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/version_test.rb b/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/version_test.rb deleted file mode 100644 index 0e91a1b88efb..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/test/google/cloud/web_risk/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/web_risk/version" - -class Google::Cloud::WebRisk::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::WebRisk::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-web_risk/test/helper.rb b/owl-bot-staging/google-cloud-web_risk/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-web_risk/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/.gitignore b/owl-bot-staging/google-cloud-web_security_scanner-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-web_security_scanner-v1/.repo-metadata.json deleted file mode 100644 index ff1da57a74a2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "websecurityscanner.googleapis.com", - "api_shortname": "websecurityscanner", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest", - "distribution_name": "google-cloud-web_security_scanner-v1", - "is_cloud": true, - "language": "ruby", - "name": "websecurityscanner", - "name_pretty": "Web Security Scanner V1 API", - "product_documentation": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. Note that google-cloud-web_security_scanner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_security_scanner instead. See the readme for more details.", - "ruby-cloud-env-prefix": "WEB_SECURITY_SCANNER", - "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/.rubocop.yml b/owl-bot-staging/google-cloud-web_security_scanner-v1/.rubocop.yml deleted file mode 100644 index d1aa57a60d61..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-web_security_scanner-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-web_security_scanner-v1.rb" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/.toys.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/.yardopts b/owl-bot-staging/google-cloud-web_security_scanner-v1/.yardopts deleted file mode 100644 index 826dfac587d4..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Web Security Scanner 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-web_security_scanner-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_security_scanner-v1/AUTHENTICATION.md deleted file mode 100644 index 840d2d274ade..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-web_security_scanner-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-web_security_scanner-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/web_security_scanner/v1" - -client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/web_security_scanner/v1" - -::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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-web_security_scanner-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/web_security_scanner/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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-web_security_scanner-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-web_security_scanner-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/LICENSE.md b/owl-bot-staging/google-cloud-web_security_scanner-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/README.md b/owl-bot-staging/google-cloud-web_security_scanner-v1/README.md deleted file mode 100644 index 58219b923452..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Web Security Scanner V1 API - -Scans your Compute and App Engine apps for common web vulnerabilities. - -Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Web Security Scanner V1 API. Most users should consider using -the main client gem, -[google-cloud-web_security_scanner](https://rubygems.org/gems/google-cloud-web_security_scanner). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-web_security_scanner-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/websecurityscanner.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/web_security_scanner/v1" - -client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new -request = ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new # (request fields as keyword arguments...) -response = client.create_scan_config request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-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/web_security_scanner/v1" -require "logger" - -client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-web_security_scanner`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-web_security_scanner-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-web_security_scanner`. -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-web_security_scanner-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-web_security_scanner-v1/Rakefile b/owl-bot-staging/google-cloud-web_security_scanner-v1/Rakefile deleted file mode 100644 index 4216b0dd6f74..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WEB_SECURITY_SCANNER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WEB_SECURITY_SCANNER_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 WEB_SECURITY_SCANNER_TEST_PROJECT=test123 WEB_SECURITY_SCANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials" - ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WEB_SECURITY_SCANNER_PROJECT"] = project - ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] = project - ENV["WEB_SECURITY_SCANNER_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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-web_security_scanner-v1" - header "google-cloud-web_security_scanner-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-web_security_scanner-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-web_security_scanner-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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-web_security_scanner-v1/gapic_metadata.json deleted file mode 100644 index bc19a64a2036..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/gapic_metadata.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.websecurityscanner.v1", - "libraryPackage": "::Google::Cloud::WebSecurityScanner::V1", - "services": { - "WebSecurityScanner": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client", - "rpcs": { - "CreateScanConfig": { - "methods": [ - "create_scan_config" - ] - }, - "DeleteScanConfig": { - "methods": [ - "delete_scan_config" - ] - }, - "GetScanConfig": { - "methods": [ - "get_scan_config" - ] - }, - "ListScanConfigs": { - "methods": [ - "list_scan_configs" - ] - }, - "UpdateScanConfig": { - "methods": [ - "update_scan_config" - ] - }, - "StartScanRun": { - "methods": [ - "start_scan_run" - ] - }, - "GetScanRun": { - "methods": [ - "get_scan_run" - ] - }, - "ListScanRuns": { - "methods": [ - "list_scan_runs" - ] - }, - "StopScanRun": { - "methods": [ - "stop_scan_run" - ] - }, - "ListCrawledUrls": { - "methods": [ - "list_crawled_urls" - ] - }, - "GetFinding": { - "methods": [ - "get_finding" - ] - }, - "ListFindings": { - "methods": [ - "list_findings" - ] - }, - "ListFindingTypeStats": { - "methods": [ - "list_finding_type_stats" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/google-cloud-web_security_scanner-v1.gemspec b/owl-bot-staging/google-cloud-web_security_scanner-v1/google-cloud-web_security_scanner-v1.gemspec deleted file mode 100644 index e21b5930236d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/google-cloud-web_security_scanner-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/web_security_scanner/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-web_security_scanner-v1" - gem.version = Google::Cloud::WebSecurityScanner::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. Note that google-cloud-web_security_scanner-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_security_scanner instead. See the readme for more details." - gem.summary = "Scans your Compute and App Engine apps for common web vulnerabilities." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google-cloud-web_security_scanner-v1.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google-cloud-web_security_scanner-v1.rb deleted file mode 100644 index 364764ba9da8..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google-cloud-web_security_scanner-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/web_security_scanner/v1" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1.rb deleted file mode 100644 index 4ddf0087078f..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/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/web_security_scanner/v1/web_security_scanner" -require "google/cloud/web_security_scanner/v1/version" - -module Google - module Cloud - module WebSecurityScanner - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/web_security_scanner/v1" - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/web_security_scanner/v1" - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/web_security_scanner/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/rest.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/rest.rb deleted file mode 100644 index 7b9965314561..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/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/web_security_scanner/v1/web_security_scanner/rest" -require "google/cloud/web_security_scanner/v1/version" - -module Google - module Cloud - module WebSecurityScanner - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/web_security_scanner/v1/rest" - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/version.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/version.rb deleted file mode 100644 index d7cb02f682fa..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/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 WebSecurityScanner - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner.rb deleted file mode 100644 index 2f4a9b948057..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner.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/web_security_scanner/v1/version" - -require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials" -require "google/cloud/web_security_scanner/v1/web_security_scanner/client" -require "google/cloud/web_security_scanner/v1/web_security_scanner/rest" - -module Google - module Cloud - module WebSecurityScanner - module V1 - ## - # Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/web_security_scanner/v1/web_security_scanner" - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/web_security_scanner/v1/web_security_scanner/rest" - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - module WebSecurityScanner - end - end - end - end -end - -helper_path = ::File.join __dir__, "web_security_scanner", "helpers.rb" -require "google/cloud/web_security_scanner/v1/web_security_scanner/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/client.rb deleted file mode 100644 index ff36744057f1..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/client.rb +++ /dev/null @@ -1,1719 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/websecurityscanner/v1/web_security_scanner_pb" - -module Google - module Cloud - module WebSecurityScanner - module V1 - module WebSecurityScanner - ## - # Client for the WebSecurityScanner service. - # - # Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "websecurityscanner.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :web_security_scanner_stub - - ## - # Configure the WebSecurityScanner Client class. - # - # See {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WebSecurityScanner clients - # ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "WebSecurityScanner", "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_scan_config.timeout = 600.0 - - default_config.rpcs.delete_scan_config.timeout = 600.0 - default_config.rpcs.delete_scan_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_scan_config.timeout = 600.0 - default_config.rpcs.get_scan_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_scan_configs.timeout = 600.0 - default_config.rpcs.list_scan_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_scan_config.timeout = 600.0 - - default_config.rpcs.start_scan_run.timeout = 600.0 - - default_config.rpcs.get_scan_run.timeout = 600.0 - default_config.rpcs.get_scan_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_scan_runs.timeout = 600.0 - default_config.rpcs.list_scan_runs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.stop_scan_run.timeout = 600.0 - - default_config.rpcs.list_crawled_urls.timeout = 600.0 - default_config.rpcs.list_crawled_urls.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_finding.timeout = 600.0 - default_config.rpcs.get_finding.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 600.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_finding_type_stats.timeout = 600.0 - default_config.rpcs.list_finding_type_stats.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 WebSecurityScanner Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @web_security_scanner_stub.universe_domain - end - - ## - # Create a new WebSecurityScanner client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WebSecurityScanner 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/websecurityscanner/v1/web_security_scanner_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 - - @web_security_scanner_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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 - ) - - @web_security_scanner_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 - @web_security_scanner_stub.logger - end - - # Service calls - - ## - # Creates a new ScanConfig. - # - # @overload create_scan_config(request, options = nil) - # Pass arguments to `create_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_scan_config(parent: nil, scan_config: nil) - # Pass arguments to `create_scan_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name where the scan is created, which should be a - # project resource name in the format 'projects/\\{projectId}'. - # @param scan_config [::Google::Cloud::WebSecurityScanner::V1::ScanConfig, ::Hash] - # Required. The ScanConfig to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new - # - # # Call the create_scan_config method. - # result = client.create_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. - # p result - # - def create_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_scan_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::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_scan_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :create_scan_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing ScanConfig and its child resources. - # - # @overload delete_scan_config(request, options = nil) - # Pass arguments to `delete_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_scan_config(name: nil) - # Pass arguments to `delete_scan_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 resource name of the ScanConfig to be deleted. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new - # - # # Call the delete_scan_config method. - # result = client.delete_scan_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_scan_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::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_scan_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :delete_scan_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ScanConfig. - # - # @overload get_scan_config(request, options = nil) - # Pass arguments to `get_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_scan_config(name: nil) - # Pass arguments to `get_scan_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 resource name of the ScanConfig to be returned. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new - # - # # Call the get_scan_config method. - # result = client.get_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. - # p result - # - def get_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_scan_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::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_scan_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :get_scan_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ScanConfigs under a given project. - # - # @overload list_scan_configs(request, options = nil) - # Pass arguments to `list_scan_configs` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_scan_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_scan_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, which should be a project resource name in the - # format 'projects/\\{projectId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of ScanConfigs to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new - # - # # Call the list_scan_configs method. - # result = client.list_scan_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::WebSecurityScanner::V1::ScanConfig. - # p item - # end - # - def list_scan_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_scan_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::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_scan_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scan_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_scan_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a ScanConfig. This method support partial update of a ScanConfig. - # - # @overload update_scan_config(request, options = nil) - # Pass arguments to `update_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_scan_config(scan_config: nil, update_mask: nil) - # Pass arguments to `update_scan_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 scan_config [::Google::Cloud::WebSecurityScanner::V1::ScanConfig, ::Hash] - # Required. The ScanConfig to be updated. The name field must be set to identify the - # resource to be updated. The values of fields not covered by the mask - # will be ignored. - # @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::WebSecurityScanner::V1::ScanConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new - # - # # Call the update_scan_config method. - # result = client.update_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. - # p result - # - def update_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_scan_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::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.scan_config&.name - header_params["scan_config.name"] = request.scan_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_scan_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :update_scan_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 - - ## - # Start a ScanRun according to the given ScanConfig. - # - # @overload start_scan_run(request, options = nil) - # Pass arguments to `start_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scan_run(name: nil) - # Pass arguments to `start_scan_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 resource name of the ScanConfig to be used. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new - # - # # Call the start_scan_run method. - # result = client.start_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. - # p result - # - def start_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest - - # Converts hash and nil to 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_scan_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::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_scan_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :start_scan_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 - - ## - # Gets a ScanRun. - # - # @overload get_scan_run(request, options = nil) - # Pass arguments to `get_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_scan_run(name: nil) - # Pass arguments to `get_scan_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 resource name of the ScanRun to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new - # - # # Call the get_scan_run method. - # result = client.get_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. - # p result - # - def get_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_scan_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::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_scan_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :get_scan_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 - - ## - # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun - # stop time. - # - # @overload list_scan_runs(request, options = nil) - # Pass arguments to `list_scan_runs` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_scan_runs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_scan_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. The parent resource name, which should be a scan resource name in the - # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of ScanRuns to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new - # - # # Call the list_scan_runs method. - # result = client.list_scan_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::WebSecurityScanner::V1::ScanRun. - # p item - # end - # - def list_scan_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_scan_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::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_scan_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scan_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_scan_runs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_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 - - ## - # Stops a ScanRun. The stopped ScanRun is returned. - # - # @overload stop_scan_run(request, options = nil) - # Pass arguments to `stop_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scan_run(name: nil) - # Pass arguments to `stop_scan_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 resource name of the ScanRun to be stopped. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new - # - # # Call the stop_scan_run method. - # result = client.stop_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. - # p result - # - def stop_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest - - # Converts hash and nil to 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_scan_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::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_scan_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stop_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :stop_scan_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 - - ## - # List CrawledUrls under a given ScanRun. - # - # @overload list_crawled_urls(request, options = nil) - # Pass arguments to `list_crawled_urls` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_crawled_urls(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_crawled_urls` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of CrawledUrls to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new - # - # # Call the list_crawled_urls method. - # result = client.list_crawled_urls request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::CrawledUrl. - # p item - # end - # - def list_crawled_urls request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_crawled_urls.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_crawled_urls.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_crawled_urls.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_crawled_urls, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, request, response, 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 Finding. - # - # @overload get_finding(request, options = nil) - # Pass arguments to `get_finding` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_finding(name: nil) - # Pass arguments to `get_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Finding to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new - # - # # Call the get_finding method. - # result = client.get_finding request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::Finding. - # p result - # - def get_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :get_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List Findings under a given ScanRun. - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @param filter [::String] - # The filter expression. The expression must be in the format: - # . - # Supported field: 'finding_type'. - # Supported operator: '='. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of Findings to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::Finding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::Finding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::Finding. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all FindingTypeStats under a given ScanRun. - # - # @overload list_finding_type_stats(request, options = nil) - # Pass arguments to `list_finding_type_stats` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_finding_type_stats(parent: nil) - # Pass arguments to `list_finding_type_stats` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new - # - # # Call the list_finding_type_stats method. - # result = client.list_finding_type_stats request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse. - # p result - # - def list_finding_type_stats request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_finding_type_stats.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_finding_type_stats.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_finding_type_stats.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_finding_type_stats, request, 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 WebSecurityScanner API. - # - # This class represents the configuration for WebSecurityScanner, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_scan_config to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_scan_config.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_scan_config.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "websecurityscanner.googleapis.com" - - config_attr :endpoint, nil, ::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 WebSecurityScanner API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scan_config - ## - # RPC-specific configuration for `delete_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scan_config - ## - # RPC-specific configuration for `get_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scan_config - ## - # RPC-specific configuration for `list_scan_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scan_configs - ## - # RPC-specific configuration for `update_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scan_config - ## - # RPC-specific configuration for `start_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :start_scan_run - ## - # RPC-specific configuration for `get_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scan_run - ## - # RPC-specific configuration for `list_scan_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scan_runs - ## - # RPC-specific configuration for `stop_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_scan_run - ## - # RPC-specific configuration for `list_crawled_urls` - # @return [::Gapic::Config::Method] - # - attr_reader :list_crawled_urls - ## - # RPC-specific configuration for `get_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_finding - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_finding_type_stats` - # @return [::Gapic::Config::Method] - # - attr_reader :list_finding_type_stats - - # @private - def initialize parent_rpcs = nil - create_scan_config_config = parent_rpcs.create_scan_config if parent_rpcs.respond_to? :create_scan_config - @create_scan_config = ::Gapic::Config::Method.new create_scan_config_config - delete_scan_config_config = parent_rpcs.delete_scan_config if parent_rpcs.respond_to? :delete_scan_config - @delete_scan_config = ::Gapic::Config::Method.new delete_scan_config_config - get_scan_config_config = parent_rpcs.get_scan_config if parent_rpcs.respond_to? :get_scan_config - @get_scan_config = ::Gapic::Config::Method.new get_scan_config_config - list_scan_configs_config = parent_rpcs.list_scan_configs if parent_rpcs.respond_to? :list_scan_configs - @list_scan_configs = ::Gapic::Config::Method.new list_scan_configs_config - update_scan_config_config = parent_rpcs.update_scan_config if parent_rpcs.respond_to? :update_scan_config - @update_scan_config = ::Gapic::Config::Method.new update_scan_config_config - start_scan_run_config = parent_rpcs.start_scan_run if parent_rpcs.respond_to? :start_scan_run - @start_scan_run = ::Gapic::Config::Method.new start_scan_run_config - get_scan_run_config = parent_rpcs.get_scan_run if parent_rpcs.respond_to? :get_scan_run - @get_scan_run = ::Gapic::Config::Method.new get_scan_run_config - list_scan_runs_config = parent_rpcs.list_scan_runs if parent_rpcs.respond_to? :list_scan_runs - @list_scan_runs = ::Gapic::Config::Method.new list_scan_runs_config - stop_scan_run_config = parent_rpcs.stop_scan_run if parent_rpcs.respond_to? :stop_scan_run - @stop_scan_run = ::Gapic::Config::Method.new stop_scan_run_config - list_crawled_urls_config = parent_rpcs.list_crawled_urls if parent_rpcs.respond_to? :list_crawled_urls - @list_crawled_urls = ::Gapic::Config::Method.new list_crawled_urls_config - get_finding_config = parent_rpcs.get_finding if parent_rpcs.respond_to? :get_finding - @get_finding = ::Gapic::Config::Method.new get_finding_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_finding_type_stats_config = parent_rpcs.list_finding_type_stats if parent_rpcs.respond_to? :list_finding_type_stats - @list_finding_type_stats = ::Gapic::Config::Method.new list_finding_type_stats_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/credentials.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/credentials.rb deleted file mode 100644 index 2112c835a5a7..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/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 WebSecurityScanner - module V1 - module WebSecurityScanner - # Credentials for the WebSecurityScanner API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "WEB_SECURITY_SCANNER_CREDENTIALS", - "WEB_SECURITY_SCANNER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "WEB_SECURITY_SCANNER_CREDENTIALS_JSON", - "WEB_SECURITY_SCANNER_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-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest.rb deleted file mode 100644 index f23009d99847..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/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/web_security_scanner/v1/version" - -require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials" -require "google/cloud/web_security_scanner/v1/web_security_scanner/rest/client" - -module Google - module Cloud - module WebSecurityScanner - module V1 - ## - # Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/web_security_scanner/v1/web_security_scanner/rest" - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - module WebSecurityScanner - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/web_security_scanner/v1/web_security_scanner/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/client.rb deleted file mode 100644 index 34f66942801b..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/client.rb +++ /dev/null @@ -1,1585 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/websecurityscanner/v1/web_security_scanner_pb" -require "google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub" - -module Google - module Cloud - module WebSecurityScanner - module V1 - module WebSecurityScanner - module Rest - ## - # REST client for the WebSecurityScanner service. - # - # Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "websecurityscanner.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :web_security_scanner_stub - - ## - # Configure the WebSecurityScanner Client class. - # - # See {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WebSecurityScanner clients - # ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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", "WebSecurityScanner", "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_scan_config.timeout = 600.0 - - default_config.rpcs.delete_scan_config.timeout = 600.0 - default_config.rpcs.delete_scan_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_scan_config.timeout = 600.0 - default_config.rpcs.get_scan_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_scan_configs.timeout = 600.0 - default_config.rpcs.list_scan_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_scan_config.timeout = 600.0 - - default_config.rpcs.start_scan_run.timeout = 600.0 - - default_config.rpcs.get_scan_run.timeout = 600.0 - default_config.rpcs.get_scan_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_scan_runs.timeout = 600.0 - default_config.rpcs.list_scan_runs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.stop_scan_run.timeout = 600.0 - - default_config.rpcs.list_crawled_urls.timeout = 600.0 - default_config.rpcs.list_crawled_urls.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_finding.timeout = 600.0 - default_config.rpcs.get_finding.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 600.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_finding_type_stats.timeout = 600.0 - default_config.rpcs.list_finding_type_stats.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 WebSecurityScanner Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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 - @web_security_scanner_stub.universe_domain - end - - ## - # Create a new WebSecurityScanner REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WebSecurityScanner 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 - - @web_security_scanner_stub = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @web_security_scanner_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 - @web_security_scanner_stub.logger - end - - # Service calls - - ## - # Creates a new ScanConfig. - # - # @overload create_scan_config(request, options = nil) - # Pass arguments to `create_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_scan_config(parent: nil, scan_config: nil) - # Pass arguments to `create_scan_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name where the scan is created, which should be a - # project resource name in the format 'projects/\\{projectId}'. - # @param scan_config [::Google::Cloud::WebSecurityScanner::V1::ScanConfig, ::Hash] - # Required. The ScanConfig to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new - # - # # Call the create_scan_config method. - # result = client.create_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. - # p result - # - def create_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest - - # Converts hash and nil to an 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_scan_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::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_scan_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.create_scan_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing ScanConfig and its child resources. - # - # @overload delete_scan_config(request, options = nil) - # Pass arguments to `delete_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_scan_config(name: nil) - # Pass arguments to `delete_scan_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 resource name of the ScanConfig to be deleted. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new - # - # # Call the delete_scan_config method. - # result = client.delete_scan_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_scan_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::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_scan_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.delete_scan_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ScanConfig. - # - # @overload get_scan_config(request, options = nil) - # Pass arguments to `get_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_scan_config(name: nil) - # Pass arguments to `get_scan_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 resource name of the ScanConfig to be returned. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new - # - # # Call the get_scan_config method. - # result = client.get_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. - # p result - # - def get_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_scan_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::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_scan_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.get_scan_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ScanConfigs under a given project. - # - # @overload list_scan_configs(request, options = nil) - # Pass arguments to `list_scan_configs` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_scan_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_scan_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, which should be a project resource name in the - # format 'projects/\\{projectId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of ScanConfigs to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new - # - # # Call the list_scan_configs method. - # result = client.list_scan_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::WebSecurityScanner::V1::ScanConfig. - # p item - # end - # - def list_scan_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_scan_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::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_scan_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scan_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_scan_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, "scan_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a ScanConfig. This method support partial update of a ScanConfig. - # - # @overload update_scan_config(request, options = nil) - # Pass arguments to `update_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_scan_config(scan_config: nil, update_mask: nil) - # Pass arguments to `update_scan_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 scan_config [::Google::Cloud::WebSecurityScanner::V1::ScanConfig, ::Hash] - # Required. The ScanConfig to be updated. The name field must be set to identify the - # resource to be updated. The values of fields not covered by the mask - # will be ignored. - # @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::WebSecurityScanner::V1::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new - # - # # Call the update_scan_config method. - # result = client.update_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. - # p result - # - def update_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_scan_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::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_scan_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.update_scan_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 - - ## - # Start a ScanRun according to the given ScanConfig. - # - # @overload start_scan_run(request, options = nil) - # Pass arguments to `start_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scan_run(name: nil) - # Pass arguments to `start_scan_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 resource name of the ScanConfig to be used. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new - # - # # Call the start_scan_run method. - # result = client.start_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. - # p result - # - def start_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest - - # Converts hash and nil to an 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_scan_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::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_scan_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.start_scan_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 - - ## - # Gets a ScanRun. - # - # @overload get_scan_run(request, options = nil) - # Pass arguments to `get_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_scan_run(name: nil) - # Pass arguments to `get_scan_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 resource name of the ScanRun to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new - # - # # Call the get_scan_run method. - # result = client.get_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. - # p result - # - def get_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_scan_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::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_scan_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.get_scan_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 - - ## - # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun - # stop time. - # - # @overload list_scan_runs(request, options = nil) - # Pass arguments to `list_scan_runs` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_scan_runs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_scan_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. The parent resource name, which should be a scan resource name in the - # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of ScanRuns to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new - # - # # Call the list_scan_runs method. - # result = client.list_scan_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::WebSecurityScanner::V1::ScanRun. - # p item - # end - # - def list_scan_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_scan_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::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_scan_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scan_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_scan_runs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_runs, "scan_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 - - ## - # Stops a ScanRun. The stopped ScanRun is returned. - # - # @overload stop_scan_run(request, options = nil) - # Pass arguments to `stop_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scan_run(name: nil) - # Pass arguments to `stop_scan_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 resource name of the ScanRun to be stopped. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new - # - # # Call the stop_scan_run method. - # result = client.stop_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. - # p result - # - def stop_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest - - # Converts hash and nil to an 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_scan_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::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_scan_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.stop_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.stop_scan_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 - - ## - # List CrawledUrls under a given ScanRun. - # - # @overload list_crawled_urls(request, options = nil) - # Pass arguments to `list_crawled_urls` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_crawled_urls(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_crawled_urls` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of CrawledUrls to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new - # - # # Call the list_crawled_urls method. - # result = client.list_crawled_urls request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::CrawledUrl. - # p item - # end - # - def list_crawled_urls request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_crawled_urls.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_crawled_urls.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_crawled_urls.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_crawled_urls request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, "crawled_urls", request, result, 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 Finding. - # - # @overload get_finding(request, options = nil) - # Pass arguments to `get_finding` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_finding(name: nil) - # Pass arguments to `get_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Finding to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new - # - # # Call the get_finding method. - # result = client.get_finding request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::Finding. - # p result - # - def get_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.get_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List Findings under a given ScanRun. - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @param filter [::String] - # The filter expression. The expression must be in the format: - # . - # Supported field: 'finding_type'. - # Supported operator: '='. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of Findings to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::Finding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1::Finding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::Finding. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_findings, "findings", request, result, 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 FindingTypeStats under a given ScanRun. - # - # @overload list_finding_type_stats(request, options = nil) - # Pass arguments to `list_finding_type_stats` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_finding_type_stats(parent: nil) - # Pass arguments to `list_finding_type_stats` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new - # - # # Call the list_finding_type_stats method. - # result = client.list_finding_type_stats request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse. - # p result - # - def list_finding_type_stats request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_finding_type_stats.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_finding_type_stats.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_finding_type_stats.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_finding_type_stats request, 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 WebSecurityScanner REST API. - # - # This class represents the configuration for WebSecurityScanner 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::WebSecurityScanner::V1::WebSecurityScanner::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_scan_config to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_scan_config.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_scan_config.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "websecurityscanner.googleapis.com" - - config_attr :endpoint, nil, ::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 WebSecurityScanner API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scan_config - ## - # RPC-specific configuration for `delete_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scan_config - ## - # RPC-specific configuration for `get_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scan_config - ## - # RPC-specific configuration for `list_scan_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scan_configs - ## - # RPC-specific configuration for `update_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scan_config - ## - # RPC-specific configuration for `start_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :start_scan_run - ## - # RPC-specific configuration for `get_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scan_run - ## - # RPC-specific configuration for `list_scan_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scan_runs - ## - # RPC-specific configuration for `stop_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_scan_run - ## - # RPC-specific configuration for `list_crawled_urls` - # @return [::Gapic::Config::Method] - # - attr_reader :list_crawled_urls - ## - # RPC-specific configuration for `get_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_finding - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_finding_type_stats` - # @return [::Gapic::Config::Method] - # - attr_reader :list_finding_type_stats - - # @private - def initialize parent_rpcs = nil - create_scan_config_config = parent_rpcs.create_scan_config if parent_rpcs.respond_to? :create_scan_config - @create_scan_config = ::Gapic::Config::Method.new create_scan_config_config - delete_scan_config_config = parent_rpcs.delete_scan_config if parent_rpcs.respond_to? :delete_scan_config - @delete_scan_config = ::Gapic::Config::Method.new delete_scan_config_config - get_scan_config_config = parent_rpcs.get_scan_config if parent_rpcs.respond_to? :get_scan_config - @get_scan_config = ::Gapic::Config::Method.new get_scan_config_config - list_scan_configs_config = parent_rpcs.list_scan_configs if parent_rpcs.respond_to? :list_scan_configs - @list_scan_configs = ::Gapic::Config::Method.new list_scan_configs_config - update_scan_config_config = parent_rpcs.update_scan_config if parent_rpcs.respond_to? :update_scan_config - @update_scan_config = ::Gapic::Config::Method.new update_scan_config_config - start_scan_run_config = parent_rpcs.start_scan_run if parent_rpcs.respond_to? :start_scan_run - @start_scan_run = ::Gapic::Config::Method.new start_scan_run_config - get_scan_run_config = parent_rpcs.get_scan_run if parent_rpcs.respond_to? :get_scan_run - @get_scan_run = ::Gapic::Config::Method.new get_scan_run_config - list_scan_runs_config = parent_rpcs.list_scan_runs if parent_rpcs.respond_to? :list_scan_runs - @list_scan_runs = ::Gapic::Config::Method.new list_scan_runs_config - stop_scan_run_config = parent_rpcs.stop_scan_run if parent_rpcs.respond_to? :stop_scan_run - @stop_scan_run = ::Gapic::Config::Method.new stop_scan_run_config - list_crawled_urls_config = parent_rpcs.list_crawled_urls if parent_rpcs.respond_to? :list_crawled_urls - @list_crawled_urls = ::Gapic::Config::Method.new list_crawled_urls_config - get_finding_config = parent_rpcs.get_finding if parent_rpcs.respond_to? :get_finding - @get_finding = ::Gapic::Config::Method.new get_finding_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_finding_type_stats_config = parent_rpcs.list_finding_type_stats if parent_rpcs.respond_to? :list_finding_type_stats - @list_finding_type_stats = ::Gapic::Config::Method.new list_finding_type_stats_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub.rb deleted file mode 100644 index e6edf6a664f0..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/web_security_scanner/v1/web_security_scanner/rest/service_stub.rb +++ /dev/null @@ -1,878 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/websecurityscanner/v1/web_security_scanner_pb" - -module Google - module Cloud - module WebSecurityScanner - module V1 - module WebSecurityScanner - module Rest - ## - # REST service stub for the WebSecurityScanner 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_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # A result object deserialized from the server's reply - def create_scan_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_scan_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_scan_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_scan_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_scan_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_scan_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_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # A result object deserialized from the server's reply - def get_scan_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_scan_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_scan_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_scan_configs REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse] - # A result object deserialized from the server's reply - def list_scan_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scan_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_scan_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # A result object deserialized from the server's reply - def update_scan_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_scan_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_scan_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.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_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # A result object deserialized from the server's reply - def start_scan_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_scan_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: "start_scan_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # A result object deserialized from the server's reply - def get_scan_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_scan_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_scan_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_scan_runs REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse] - # A result object deserialized from the server's reply - def list_scan_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scan_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_scan_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse.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_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun] - # A result object deserialized from the server's reply - def stop_scan_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_stop_scan_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: "stop_scan_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_crawled_urls REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse] - # A result object deserialized from the server's reply - def list_crawled_urls request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_crawled_urls_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_crawled_urls", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_finding REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::Finding] - # A result object deserialized from the server's reply - def get_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_findings REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse] - # A result object deserialized from the server's reply - def list_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_finding_type_stats REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse] - # A result object deserialized from the server's reply - def list_finding_type_stats request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_finding_type_stats_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_finding_type_stats", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse.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_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest] - # 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_scan_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/scanConfigs", - body: "scan_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_scan_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_scan_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scan_configs REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_scan_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/scanConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_scan_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{scan_config.name}", - body: "scan_config", - matches: [ - ["scan_config.name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest] - # 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_scan_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_scan_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scan_runs REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_scan_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/scanRuns", - matches: [ - ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the stop_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest] - # 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_scan_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:stop", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_crawled_urls REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_crawled_urls_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/crawledUrls", - matches: [ - ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_finding REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_findings REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findings", - matches: [ - ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_finding_type_stats REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_finding_type_stats_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/findingTypeStats", - matches: [ - ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/crawled_url_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/crawled_url_pb.rb deleted file mode 100644 index efefdf647928..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/crawled_url_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/crawled_url.proto - -require 'google/protobuf' - - -descriptor_data = "\n4google/cloud/websecurityscanner/v1/crawled_url.proto\x12\"google.cloud.websecurityscanner.v1\"<\n\nCrawledUrl\x12\x13\n\x0bhttp_method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0c\n\x04\x62ody\x18\x03 \x01(\tB\x85\x02\n&com.google.cloud.websecurityscanner.v1B\x0f\x43rawledUrlProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - CrawledUrl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.CrawledUrl").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_addon_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_addon_pb.rb deleted file mode 100644 index f2048c20daa2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_addon_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/finding_addon.proto - -require 'google/protobuf' - - -descriptor_data = "\n6google/cloud/websecurityscanner/v1/finding_addon.proto\x12\"google.cloud.websecurityscanner.v1\"*\n\x04\x46orm\x12\x12\n\naction_uri\x18\x01 \x01(\t\x12\x0e\n\x06\x66ields\x18\x02 \x03(\t\"Q\n\x0fOutdatedLibrary\x12\x14\n\x0clibrary_name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x17\n\x0flearn_more_urls\x18\x03 \x03(\t\"?\n\x11ViolatingResource\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x14\n\x0cresource_url\x18\x02 \x01(\t\"/\n\x14VulnerableParameters\x12\x17\n\x0fparameter_names\x18\x01 \x03(\t\"\xe0\x01\n\x11VulnerableHeaders\x12M\n\x07headers\x18\x01 \x03(\x0b\x32<.google.cloud.websecurityscanner.v1.VulnerableHeaders.Header\x12U\n\x0fmissing_headers\x18\x02 \x03(\x0b\x32<.google.cloud.websecurityscanner.v1.VulnerableHeaders.Header\x1a%\n\x06Header\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\xdb\x03\n\x03Xss\x12\x14\n\x0cstack_traces\x18\x01 \x03(\t\x12\x15\n\rerror_message\x18\x02 \x01(\t\x12K\n\rattack_vector\x18\x03 \x01(\x0e\x32\x34.google.cloud.websecurityscanner.v1.Xss.AttackVector\x12\x1e\n\x16stored_xss_seeding_url\x18\x04 \x01(\t\"\xb9\x02\n\x0c\x41ttackVector\x12\x1d\n\x19\x41TTACK_VECTOR_UNSPECIFIED\x10\x00\x12\x11\n\rLOCAL_STORAGE\x10\x01\x12\x13\n\x0fSESSION_STORAGE\x10\x02\x12\x0f\n\x0bWINDOW_NAME\x10\x03\x12\x0c\n\x08REFERRER\x10\x04\x12\x0e\n\nFORM_INPUT\x10\x05\x12\n\n\x06\x43OOKIE\x10\x06\x12\x10\n\x0cPOST_MESSAGE\x10\x07\x12\x12\n\x0eGET_PARAMETERS\x10\x08\x12\x10\n\x0cURL_FRAGMENT\x10\t\x12\x10\n\x0cHTML_COMMENT\x10\n\x12\x13\n\x0fPOST_PARAMETERS\x10\x0b\x12\x0c\n\x08PROTOCOL\x10\x0c\x12\x0e\n\nSTORED_XSS\x10\r\x12\x0f\n\x0bSAME_ORIGIN\x10\x0e\x12\x19\n\x15USER_CONTROLLABLE_URL\x10\x0f\"\xa9\x01\n\x03Xxe\x12\x15\n\rpayload_value\x18\x01 \x01(\t\x12J\n\x10payload_location\x18\x02 \x01(\x0e\x32\x30.google.cloud.websecurityscanner.v1.Xxe.Location\"?\n\x08Location\x12\x18\n\x14LOCATION_UNSPECIFIED\x10\x00\x12\x19\n\x15\x43OMPLETE_REQUEST_BODY\x10\x01\x42\x87\x02\n&com.google.cloud.websecurityscanner.v1B\x11\x46indingAddonProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - Form = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Form").msgclass - OutdatedLibrary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.OutdatedLibrary").msgclass - ViolatingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ViolatingResource").msgclass - VulnerableParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.VulnerableParameters").msgclass - VulnerableHeaders = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.VulnerableHeaders").msgclass - VulnerableHeaders::Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.VulnerableHeaders.Header").msgclass - Xss = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Xss").msgclass - Xss::AttackVector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Xss.AttackVector").enummodule - Xxe = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Xxe").msgclass - Xxe::Location = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Xxe.Location").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_pb.rb deleted file mode 100644 index 9410b14b3ae8..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/finding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/websecurityscanner/v1/finding_addon_pb' - - -descriptor_data = "\n0google/cloud/websecurityscanner/v1/finding.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x36google/cloud/websecurityscanner/v1/finding_addon.proto\"\xec\x07\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x66inding_type\x18\x02 \x01(\t\x12K\n\x08severity\x18\x11 \x01(\x0e\x32\x34.google.cloud.websecurityscanner.v1.Finding.SeverityB\x03\xe0\x41\x03\x12\x13\n\x0bhttp_method\x18\x03 \x01(\t\x12\x12\n\nfuzzed_url\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x18\n\x10reproduction_url\x18\x07 \x01(\t\x12\x11\n\tframe_url\x18\x08 \x01(\t\x12\x11\n\tfinal_url\x18\t \x01(\t\x12\x13\n\x0btracking_id\x18\n \x01(\t\x12\x36\n\x04\x66orm\x18\x10 \x01(\x0b\x32(.google.cloud.websecurityscanner.v1.Form\x12M\n\x10outdated_library\x18\x0b \x01(\x0b\x32\x33.google.cloud.websecurityscanner.v1.OutdatedLibrary\x12Q\n\x12violating_resource\x18\x0c \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.ViolatingResource\x12Q\n\x12vulnerable_headers\x18\x0f \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.VulnerableHeaders\x12W\n\x15vulnerable_parameters\x18\r \x01(\x0b\x32\x38.google.cloud.websecurityscanner.v1.VulnerableParameters\x12\x34\n\x03xss\x18\x0e \x01(\x0b\x32\'.google.cloud.websecurityscanner.v1.Xss\x12\x39\n\x03xxe\x18\x12 \x01(\x0b\x32\'.google.cloud.websecurityscanner.v1.XxeB\x03\xe0\x41\x03\"Q\n\x08Severity\x12\x18\n\x14SEVERITY_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43RITICAL\x10\x01\x12\x08\n\x04HIGH\x10\x02\x12\n\n\x06MEDIUM\x10\x03\x12\x07\n\x03LOW\x10\x04:\x84\x01\xea\x41\x80\x01\n)websecurityscanner.googleapis.com/Finding\x12Sprojects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}B\x82\x02\n&com.google.cloud.websecurityscanner.v1B\x0c\x46indingProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.websecurityscanner.v1.Form", "google/cloud/websecurityscanner/v1/finding_addon.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Finding").msgclass - Finding::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.Finding.Severity").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_type_stats_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_type_stats_pb.rb deleted file mode 100644 index 20fb14af2f5d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/finding_type_stats_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/finding_type_stats.proto - -require 'google/protobuf' - - -descriptor_data = "\n;google/cloud/websecurityscanner/v1/finding_type_stats.proto\x12\"google.cloud.websecurityscanner.v1\"?\n\x10\x46indingTypeStats\x12\x14\n\x0c\x66inding_type\x18\x01 \x01(\t\x12\x15\n\rfinding_count\x18\x02 \x01(\x05\x42\x8b\x02\n&com.google.cloud.websecurityscanner.v1B\x15\x46indingTypeStatsProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - FindingTypeStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.FindingTypeStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_error_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_error_pb.rb deleted file mode 100644 index d798b7b62388..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_error_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/scan_config_error.proto - -require 'google/protobuf' - - -descriptor_data = "\n:google/cloud/websecurityscanner/v1/scan_config_error.proto\x12\"google.cloud.websecurityscanner.v1\"\xe9\x0b\n\x0fScanConfigError\x12\x46\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x38.google.cloud.websecurityscanner.v1.ScanConfigError.Code\x12\x12\n\nfield_name\x18\x02 \x01(\t\"\xf9\n\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x1f\n\x1b\x41PPENGINE_API_BACKEND_ERROR\x10\x02\x12 \n\x1c\x41PPENGINE_API_NOT_ACCESSIBLE\x10\x03\x12\"\n\x1e\x41PPENGINE_DEFAULT_HOST_MISSING\x10\x04\x12!\n\x1d\x43\x41NNOT_USE_GOOGLE_COM_ACCOUNT\x10\x06\x12\x1c\n\x18\x43\x41NNOT_USE_OWNER_ACCOUNT\x10\x07\x12\x1d\n\x19\x43OMPUTE_API_BACKEND_ERROR\x10\x08\x12\x1e\n\x1a\x43OMPUTE_API_NOT_ACCESSIBLE\x10\t\x12\x37\n3CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\n\x12\x1e\n\x1a\x43USTOM_LOGIN_URL_MALFORMED\x10\x0b\x12\x33\n/CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x0c\x12\x31\n-CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10\r\x12\x30\n,CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10\x0e\x12.\n*CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS\x10\x0f\x12\x17\n\x13\x44UPLICATE_SCAN_NAME\x10\x10\x12\x17\n\x13INVALID_FIELD_VALUE\x10\x12\x12$\n FAILED_TO_AUTHENTICATE_TO_TARGET\x10\x13\x12\x1c\n\x18\x46INDING_TYPE_UNSPECIFIED\x10\x14\x12\x1d\n\x19\x46ORBIDDEN_TO_SCAN_COMPUTE\x10\x15\x12$\n FORBIDDEN_UPDATE_TO_MANAGED_SCAN\x10+\x12\x14\n\x10MALFORMED_FILTER\x10\x16\x12\x1b\n\x17MALFORMED_RESOURCE_NAME\x10\x17\x12\x14\n\x10PROJECT_INACTIVE\x10\x18\x12\x12\n\x0eREQUIRED_FIELD\x10\x19\x12\x1e\n\x1aRESOURCE_NAME_INCONSISTENT\x10\x1a\x12\x18\n\x14SCAN_ALREADY_RUNNING\x10\x1b\x12\x14\n\x10SCAN_NOT_RUNNING\x10\x1c\x12/\n+SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\x1d\x12\x16\n\x12SEED_URL_MALFORMED\x10\x1e\x12+\n\'SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x1f\x12)\n%SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10 \x12(\n$SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10!\x12&\n\"SEED_URL_HAS_UNRESERVED_IP_ADDRESS\x10#\x12\"\n\x1eSERVICE_ACCOUNT_NOT_CONFIGURED\x10$\x12\x12\n\x0eTOO_MANY_SCANS\x10%\x12\"\n\x1eUNABLE_TO_RESOLVE_PROJECT_INFO\x10&\x12(\n$UNSUPPORTED_BLACKLIST_PATTERN_FORMAT\x10\'\x12\x16\n\x12UNSUPPORTED_FILTER\x10(\x12\x1c\n\x18UNSUPPORTED_FINDING_TYPE\x10)\x12\x1a\n\x16UNSUPPORTED_URL_SCHEME\x10*\x1a\x02\x10\x01\x42\x8a\x02\n&com.google.cloud.websecurityscanner.v1B\x14ScanConfigErrorProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - ScanConfigError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfigError").msgclass - ScanConfigError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfigError.Code").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_pb.rb deleted file mode 100644 index 2d1bab8f64ef..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_config_pb.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/scan_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/websecurityscanner/v1/scan_config.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc4\r\n\nScanConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x0f\n\x07max_qps\x18\x03 \x01(\x05\x12\x15\n\rstarting_urls\x18\x04 \x03(\t\x12U\n\x0e\x61uthentication\x18\x05 \x01(\x0b\x32=.google.cloud.websecurityscanner.v1.ScanConfig.Authentication\x12L\n\nuser_agent\x18\x06 \x01(\x0e\x32\x38.google.cloud.websecurityscanner.v1.ScanConfig.UserAgent\x12\x1a\n\x12\x62lacklist_patterns\x18\x07 \x03(\t\x12I\n\x08schedule\x18\x08 \x01(\x0b\x32\x37.google.cloud.websecurityscanner.v1.ScanConfig.Schedule\x12w\n!export_to_security_command_center\x18\n \x01(\x0e\x32L.google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter\x12L\n\nrisk_level\x18\x0c \x01(\x0e\x32\x38.google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel\x12\x14\n\x0cmanaged_scan\x18\r \x01(\x08\x12\x16\n\x0estatic_ip_scan\x18\x0e \x01(\x08\x12!\n\x19ignore_http_status_errors\x18\x0f \x01(\x08\x1a\xd7\x05\n\x0e\x41uthentication\x12i\n\x0egoogle_account\x18\x01 \x01(\x0b\x32K.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.GoogleAccountB\x02\x18\x01H\x00\x12\x65\n\x0e\x63ustom_account\x18\x02 \x01(\x0b\x32K.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.CustomAccountH\x00\x12\x65\n\x0eiap_credential\x18\x04 \x01(\x0b\x32K.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredentialH\x00\x1a\x37\n\rGoogleAccount\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t:\x02\x18\x01\x1a\x46\n\rCustomAccount\x12\x10\n\x08username\x18\x01 \x01(\t\x12\x10\n\x08password\x18\x02 \x01(\t\x12\x11\n\tlogin_url\x18\x03 \x01(\t\x1a\xf8\x01\n\rIapCredential\x12\x8e\x01\n\x1diap_test_service_account_info\x18\x01 \x01(\x0b\x32\x65.google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfoH\x00\x1a\x43\n\x19IapTestServiceAccountInfo\x12&\n\x19target_audience_client_id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x11\n\x0fiap_credentialsB\x10\n\x0e\x61uthentication\x1a]\n\x08Schedule\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\x16interval_duration_days\x18\x02 \x01(\x05\"`\n\tUserAgent\x12\x1a\n\x16USER_AGENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43HROME_LINUX\x10\x01\x12\x12\n\x0e\x43HROME_ANDROID\x10\x02\x12\x11\n\rSAFARI_IPHONE\x10\x03\"<\n\tRiskLevel\x12\x1a\n\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\"m\n\x1d\x45xportToSecurityCommandCenter\x12\x31\n-EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\x42\x85\x02\n&com.google.cloud.websecurityscanner.v1B\x0fScanConfigProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - ScanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig").msgclass - ScanConfig::Authentication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication").msgclass - ScanConfig::Authentication::GoogleAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication.GoogleAccount").msgclass - ScanConfig::Authentication::CustomAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication.CustomAccount").msgclass - ScanConfig::Authentication::IapCredential = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential").msgclass - ScanConfig::Authentication::IapCredential::IapTestServiceAccountInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Authentication.IapCredential.IapTestServiceAccountInfo").msgclass - ScanConfig::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.Schedule").msgclass - ScanConfig::UserAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.UserAgent").enummodule - ScanConfig::RiskLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.RiskLevel").enummodule - ScanConfig::ExportToSecurityCommandCenter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanConfig.ExportToSecurityCommandCenter").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_error_trace_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_error_trace_pb.rb deleted file mode 100644 index b5eeb0e50fd7..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_error_trace_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/scan_run_error_trace.proto - -require 'google/protobuf' - -require 'google/cloud/websecurityscanner/v1/scan_config_error_pb' - - -descriptor_data = "\n=google/cloud/websecurityscanner/v1/scan_run_error_trace.proto\x12\"google.cloud.websecurityscanner.v1\x1a:google/cloud/websecurityscanner/v1/scan_config_error.proto\"\x8d\x03\n\x11ScanRunErrorTrace\x12H\n\x04\x63ode\x18\x01 \x01(\x0e\x32:.google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code\x12N\n\x11scan_config_error\x18\x02 \x01(\x0b\x32\x33.google.cloud.websecurityscanner.v1.ScanConfigError\x12#\n\x1bmost_common_http_error_code\x18\x03 \x01(\x05\"\xb8\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x15\n\x11SCAN_CONFIG_ISSUE\x10\x02\x12\x1f\n\x1b\x41UTHENTICATION_CONFIG_ISSUE\x10\x03\x12\x1c\n\x18TIMED_OUT_WHILE_SCANNING\x10\x04\x12\x16\n\x12TOO_MANY_REDIRECTS\x10\x05\x12\x18\n\x14TOO_MANY_HTTP_ERRORS\x10\x06\x42\x8c\x02\n&com.google.cloud.websecurityscanner.v1B\x16ScanRunErrorTraceProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.websecurityscanner.v1.ScanConfigError", "google/cloud/websecurityscanner/v1/scan_config_error.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - ScanRunErrorTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunErrorTrace").msgclass - ScanRunErrorTrace::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunErrorTrace.Code").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_log_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_log_pb.rb deleted file mode 100644 index 145018be74af..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_log_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/scan_run_log.proto - -require 'google/protobuf' - -require 'google/cloud/websecurityscanner/v1/scan_run_pb' -require 'google/cloud/websecurityscanner/v1/scan_run_error_trace_pb' - - -descriptor_data = "\n5google/cloud/websecurityscanner/v1/scan_run_log.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x31google/cloud/websecurityscanner/v1/scan_run.proto\x1a=google/cloud/websecurityscanner/v1/scan_run_error_trace.proto\"\xe8\x02\n\nScanRunLog\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12S\n\x0f\x65xecution_state\x18\x03 \x01(\x0e\x32:.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState\x12M\n\x0cresult_state\x18\x04 \x01(\x0e\x32\x37.google.cloud.websecurityscanner.v1.ScanRun.ResultState\x12\x1a\n\x12urls_crawled_count\x18\x05 \x01(\x03\x12\x19\n\x11urls_tested_count\x18\x06 \x01(\x03\x12\x14\n\x0chas_findings\x18\x07 \x01(\x08\x12J\n\x0b\x65rror_trace\x18\x08 \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.ScanRunErrorTraceB\x85\x02\n&com.google.cloud.websecurityscanner.v1B\x0fScanRunLogProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.websecurityscanner.v1.ScanRunErrorTrace", "google/cloud/websecurityscanner/v1/scan_run_error_trace.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - ScanRunLog = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunLog").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_pb.rb deleted file mode 100644 index febd99f3e5f9..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/scan_run.proto - -require 'google/protobuf' - -require 'google/cloud/websecurityscanner/v1/scan_run_error_trace_pb' -require 'google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/cloud/websecurityscanner/v1/scan_run.proto\x12\"google.cloud.websecurityscanner.v1\x1a=google/cloud/websecurityscanner/v1/scan_run_error_trace.proto\x1a?google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd0\x05\n\x07ScanRun\x12\x0c\n\x04name\x18\x01 \x01(\t\x12S\n\x0f\x65xecution_state\x18\x02 \x01(\x0e\x32:.google.cloud.websecurityscanner.v1.ScanRun.ExecutionState\x12M\n\x0cresult_state\x18\x03 \x01(\x0e\x32\x37.google.cloud.websecurityscanner.v1.ScanRun.ResultState\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12urls_crawled_count\x18\x06 \x01(\x03\x12\x19\n\x11urls_tested_count\x18\x07 \x01(\x03\x12\x1b\n\x13has_vulnerabilities\x18\x08 \x01(\x08\x12\x18\n\x10progress_percent\x18\t \x01(\x05\x12J\n\x0b\x65rror_trace\x18\n \x01(\x0b\x32\x35.google.cloud.websecurityscanner.v1.ScanRunErrorTrace\x12O\n\x0ewarning_traces\x18\x0b \x03(\x0b\x32\x37.google.cloud.websecurityscanner.v1.ScanRunWarningTrace\"Y\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0c\n\x08SCANNING\x10\x02\x12\x0c\n\x08\x46INISHED\x10\x03\"O\n\x0bResultState\x12\x1c\n\x18RESULT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\n\n\x06KILLED\x10\x03\x42\x82\x02\n&com.google.cloud.websecurityscanner.v1B\x0cScanRunProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.websecurityscanner.v1.ScanRunErrorTrace", "google/cloud/websecurityscanner/v1/scan_run_error_trace.proto"], - ["google.cloud.websecurityscanner.v1.ScanRunWarningTrace", "google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - ScanRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRun").msgclass - ScanRun::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRun.ExecutionState").enummodule - ScanRun::ResultState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRun.ResultState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb.rb deleted file mode 100644 index f0968f2a598c..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/scan_run_warning_trace_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto - -require 'google/protobuf' - - -descriptor_data = "\n?google/cloud/websecurityscanner/v1/scan_run_warning_trace.proto\x12\"google.cloud.websecurityscanner.v1\"\x95\x02\n\x13ScanRunWarningTrace\x12J\n\x04\x63ode\x18\x01 \x01(\x0e\x32<.google.cloud.websecurityscanner.v1.ScanRunWarningTrace.Code\"\xb1\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aINSUFFICIENT_CRAWL_RESULTS\x10\x01\x12\x1a\n\x16TOO_MANY_CRAWL_RESULTS\x10\x02\x12\x17\n\x13TOO_MANY_FUZZ_TASKS\x10\x03\x12\x12\n\x0e\x42LOCKED_BY_IAP\x10\x04\x12*\n&NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN\x10\x05\x42\x8e\x02\n&com.google.cloud.websecurityscanner.v1B\x18ScanRunWarningTraceProtoP\x01ZVcloud.google.com/go/websecurityscanner/apiv1/websecurityscannerpb;websecurityscannerpb\xaa\x02\"Google.Cloud.WebSecurityScanner.V1\xca\x02\"Google\\Cloud\\WebSecurityScanner\\V1\xea\x02%Google::Cloud::WebSecurityScanner::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1 - ScanRunWarningTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunWarningTrace").msgclass - ScanRunWarningTrace::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1.ScanRunWarningTrace.Code").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_pb.rb deleted file mode 100644 index e7bb8473da3c..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/lib/google/cloud/websecurityscanner/v1/web_security_scanner_pb.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1/web_security_scanner.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/cloud/websecurityscanner/v1/crawled_url_pb' -require 'google/cloud/websecurityscanner/v1/finding_pb' -require 'google/cloud/websecurityscanner/v1/finding_type_stats_pb' -require 'google/cloud/websecurityscanner/v1/scan_config_pb' -require 'google/cloud/websecurityscanner/v1/scan_run_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\n=google/cloud/websecurityscanner/v1/web_security_scanner.proto\x12\"google.cloud.websecurityscanner.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x34google/cloud/websecurityscanner/v1/crawled_url.proto\x1a\x30google/cloud/websecurityscanner/v1/finding.proto\x1a;google/cloud/websecurityscanner/v1/finding_type_stats.proto\x1a\x34google/cloud/websecurityscanner/v1/scan_config.proto\x1a\x31google/cloud/websecurityscanner/v1/scan_run.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"n\n\x17\x43reateScanConfigRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x43\n\x0bscan_config\x18\x02 \x01(\x0b\x32..google.cloud.websecurityscanner.v1.ScanConfig\"\'\n\x17\x44\x65leteScanConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"$\n\x14GetScanConfigRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"O\n\x16ListScanConfigsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x8f\x01\n\x17UpdateScanConfigRequest\x12\x43\n\x0bscan_config\x18\x02 \x01(\x0b\x32..google.cloud.websecurityscanner.v1.ScanConfig\x12/\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"x\n\x17ListScanConfigsResponse\x12\x44\n\x0cscan_configs\x18\x01 \x03(\x0b\x32..google.cloud.websecurityscanner.v1.ScanConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"#\n\x13StartScanRunRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"!\n\x11GetScanRunRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"L\n\x13ListScanRunsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"o\n\x14ListScanRunsResponse\x12>\n\tscan_runs\x18\x01 \x03(\x0b\x32+.google.cloud.websecurityscanner.v1.ScanRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\"\n\x12StopScanRunRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"O\n\x16ListCrawledUrlsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"x\n\x17ListCrawledUrlsResponse\x12\x44\n\x0c\x63rawled_urls\x18\x01 \x03(\x0b\x32..google.cloud.websecurityscanner.v1.CrawledUrl\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"!\n\x11GetFindingRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\\\n\x13ListFindingsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"n\n\x14ListFindingsResponse\x12=\n\x08\x66indings\x18\x01 \x03(\x0b\x32+.google.cloud.websecurityscanner.v1.Finding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"-\n\x1bListFindingTypeStatsRequest\x12\x0e\n\x06parent\x18\x01 \x01(\t\"p\n\x1cListFindingTypeStatsResponse\x12P\n\x12\x66inding_type_stats\x18\x01 \x03(\x0b\x32\x34.google.cloud.websecurityscanner.v1.FindingTypeStats2\xe9\x13\n\x12WebSecurityScanner\x12\xb9\x01\n\x10\x43reateScanConfig\x12;.google.cloud.websecurityscanner.v1.CreateScanConfigRequest\x1a..google.cloud.websecurityscanner.v1.ScanConfig\"8\x82\xd3\xe4\x93\x02\x32\"#/v1/{parent=projects/*}/scanConfigs:\x0bscan_config\x12\x94\x01\n\x10\x44\x65leteScanConfig\x12;.google.cloud.websecurityscanner.v1.DeleteScanConfigRequest\x1a\x16.google.protobuf.Empty\"+\x82\xd3\xe4\x93\x02%*#/v1/{name=projects/*/scanConfigs/*}\x12\xa6\x01\n\rGetScanConfig\x12\x38.google.cloud.websecurityscanner.v1.GetScanConfigRequest\x1a..google.cloud.websecurityscanner.v1.ScanConfig\"+\x82\xd3\xe4\x93\x02%\x12#/v1/{name=projects/*/scanConfigs/*}\x12\xb7\x01\n\x0fListScanConfigs\x12:.google.cloud.websecurityscanner.v1.ListScanConfigsRequest\x1a;.google.cloud.websecurityscanner.v1.ListScanConfigsResponse\"+\x82\xd3\xe4\x93\x02%\x12#/v1/{parent=projects/*}/scanConfigs\x12\xc5\x01\n\x10UpdateScanConfig\x12;.google.cloud.websecurityscanner.v1.UpdateScanConfigRequest\x1a..google.cloud.websecurityscanner.v1.ScanConfig\"D\x82\xd3\xe4\x93\x02>2//v1/{scan_config.name=projects/*/scanConfigs/*}:\x0bscan_config\x12\xaa\x01\n\x0cStartScanRun\x12\x37.google.cloud.websecurityscanner.v1.StartScanRunRequest\x1a+.google.cloud.websecurityscanner.v1.ScanRun\"4\x82\xd3\xe4\x93\x02.\")/v1/{name=projects/*/scanConfigs/*}:start:\x01*\x12\xa8\x01\n\nGetScanRun\x12\x35.google.cloud.websecurityscanner.v1.GetScanRunRequest\x1a+.google.cloud.websecurityscanner.v1.ScanRun\"6\x82\xd3\xe4\x93\x02\x30\x12./v1/{name=projects/*/scanConfigs/*/scanRuns/*}\x12\xb9\x01\n\x0cListScanRuns\x12\x37.google.cloud.websecurityscanner.v1.ListScanRunsRequest\x1a\x38.google.cloud.websecurityscanner.v1.ListScanRunsResponse\"6\x82\xd3\xe4\x93\x02\x30\x12./v1/{parent=projects/*/scanConfigs/*}/scanRuns\x12\xb2\x01\n\x0bStopScanRun\x12\x36.google.cloud.websecurityscanner.v1.StopScanRunRequest\x1a+.google.cloud.websecurityscanner.v1.ScanRun\">\x82\xd3\xe4\x93\x02\x38\"3/v1/{name=projects/*/scanConfigs/*/scanRuns/*}:stop:\x01*\x12\xd0\x01\n\x0fListCrawledUrls\x12:.google.cloud.websecurityscanner.v1.ListCrawledUrlsRequest\x1a;.google.cloud.websecurityscanner.v1.ListCrawledUrlsResponse\"D\x82\xd3\xe4\x93\x02>\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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/crawled_url.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/crawled_url.rb deleted file mode 100644 index 8a90e045f7c6..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/crawled_url.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 WebSecurityScanner - module V1 - # A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web - # Security Scanner Service crawls the web applications, following all links - # within the scope of sites, to find the URLs to test against. - # @!attribute [rw] http_method - # @return [::String] - # Output only. The http method of the request that was used to visit the URL, in - # uppercase. - # @!attribute [rw] url - # @return [::String] - # Output only. The URL that was crawled. - # @!attribute [rw] body - # @return [::String] - # Output only. The body of the request that was used to visit the URL. - class CrawledUrl - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding.rb deleted file mode 100644 index a2ddddfdd390..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding.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 WebSecurityScanner - module V1 - # A Finding resource represents a vulnerability instance identified during a - # ScanRun. - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the Finding. The name follows the format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanruns/\\{scanRunId}/findings/\\{findingId}'. - # The finding IDs are generated by the system. - # @!attribute [rw] finding_type - # @return [::String] - # Output only. The type of the Finding. - # Detailed and up-to-date information on findings can be found here: - # https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings - # @!attribute [r] severity - # @return [::Google::Cloud::WebSecurityScanner::V1::Finding::Severity] - # Output only. The severity level of the reported vulnerability. - # @!attribute [rw] http_method - # @return [::String] - # Output only. The http method of the request that triggered the vulnerability, in - # uppercase. - # @!attribute [rw] fuzzed_url - # @return [::String] - # Output only. The URL produced by the server-side fuzzer and used in the request that - # triggered the vulnerability. - # @!attribute [rw] body - # @return [::String] - # Output only. The body of the request that triggered the vulnerability. - # @!attribute [rw] description - # @return [::String] - # Output only. The description of the vulnerability. - # @!attribute [rw] reproduction_url - # @return [::String] - # Output only. The URL containing human-readable payload that user can leverage to - # reproduce the vulnerability. - # @!attribute [rw] frame_url - # @return [::String] - # Output only. If the vulnerability was originated from nested IFrame, the immediate - # parent IFrame is reported. - # @!attribute [rw] final_url - # @return [::String] - # Output only. The URL where the browser lands when the vulnerability is detected. - # @!attribute [rw] tracking_id - # @return [::String] - # Output only. The tracking ID uniquely identifies a vulnerability instance across - # multiple ScanRuns. - # @!attribute [rw] form - # @return [::Google::Cloud::WebSecurityScanner::V1::Form] - # Output only. An addon containing information reported for a vulnerability with an HTML - # form, if any. - # @!attribute [rw] outdated_library - # @return [::Google::Cloud::WebSecurityScanner::V1::OutdatedLibrary] - # Output only. An addon containing information about outdated libraries. - # @!attribute [rw] violating_resource - # @return [::Google::Cloud::WebSecurityScanner::V1::ViolatingResource] - # Output only. An addon containing detailed information regarding any resource causing the - # vulnerability such as JavaScript sources, image, audio files, etc. - # @!attribute [rw] vulnerable_headers - # @return [::Google::Cloud::WebSecurityScanner::V1::VulnerableHeaders] - # Output only. An addon containing information about vulnerable or missing HTTP headers. - # @!attribute [rw] vulnerable_parameters - # @return [::Google::Cloud::WebSecurityScanner::V1::VulnerableParameters] - # Output only. An addon containing information about request parameters which were found - # to be vulnerable. - # @!attribute [rw] xss - # @return [::Google::Cloud::WebSecurityScanner::V1::Xss] - # Output only. An addon containing information reported for an XSS, if any. - # @!attribute [r] xxe - # @return [::Google::Cloud::WebSecurityScanner::V1::Xxe] - # Output only. An addon containing information reported for an XXE, if any. - class Finding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The severity level of a vulnerability. - module Severity - # No severity specified. The default value. - SEVERITY_UNSPECIFIED = 0 - - # Critical severity. - CRITICAL = 1 - - # High severity. - HIGH = 2 - - # Medium severity. - MEDIUM = 3 - - # Low severity. - LOW = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_addon.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_addon.rb deleted file mode 100644 index dbd7c7de4641..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_addon.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 WebSecurityScanner - module V1 - # ! Information about a vulnerability with an HTML. - # @!attribute [rw] action_uri - # @return [::String] - # ! The URI where to send the form when it's submitted. - # @!attribute [rw] fields - # @return [::Array<::String>] - # ! The names of form fields related to the vulnerability. - class Form - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information reported for an outdated library. - # @!attribute [rw] library_name - # @return [::String] - # The name of the outdated library. - # @!attribute [rw] version - # @return [::String] - # The version number. - # @!attribute [rw] learn_more_urls - # @return [::Array<::String>] - # URLs to learn more information about the vulnerabilities in the library. - class OutdatedLibrary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information regarding any resource causing the vulnerability such - # as JavaScript sources, image, audio files, etc. - # @!attribute [rw] content_type - # @return [::String] - # The MIME type of this resource. - # @!attribute [rw] resource_url - # @return [::String] - # URL of this violating resource. - class ViolatingResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about vulnerable request parameters. - # @!attribute [rw] parameter_names - # @return [::Array<::String>] - # The vulnerable parameter names. - class VulnerableParameters - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about vulnerable or missing HTTP Headers. - # @!attribute [rw] headers - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::VulnerableHeaders::Header>] - # List of vulnerable headers. - # @!attribute [rw] missing_headers - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::VulnerableHeaders::Header>] - # List of missing headers. - class VulnerableHeaders - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a HTTP Header. - # @!attribute [rw] name - # @return [::String] - # Header name. - # @!attribute [rw] value - # @return [::String] - # Header value. - class Header - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Information reported for an XSS. - # @!attribute [rw] stack_traces - # @return [::Array<::String>] - # Stack traces leading to the point where the XSS occurred. - # @!attribute [rw] error_message - # @return [::String] - # An error message generated by a javascript breakage. - # @!attribute [rw] attack_vector - # @return [::Google::Cloud::WebSecurityScanner::V1::Xss::AttackVector] - # The attack vector of the payload triggering this XSS. - # @!attribute [rw] stored_xss_seeding_url - # @return [::String] - # The reproduction url for the seeding POST request of a Stored XSS. - class Xss - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of XSS attack vector. - module AttackVector - # Unknown attack vector. - ATTACK_VECTOR_UNSPECIFIED = 0 - - # The attack comes from fuzzing the browser's localStorage. - LOCAL_STORAGE = 1 - - # The attack comes from fuzzing the browser's sessionStorage. - SESSION_STORAGE = 2 - - # The attack comes from fuzzing the window's name property. - WINDOW_NAME = 3 - - # The attack comes from fuzzing the referrer property. - REFERRER = 4 - - # The attack comes from fuzzing an input element. - FORM_INPUT = 5 - - # The attack comes from fuzzing the browser's cookies. - COOKIE = 6 - - # The attack comes from hijacking the post messaging mechanism. - POST_MESSAGE = 7 - - # The attack comes from fuzzing parameters in the url. - GET_PARAMETERS = 8 - - # The attack comes from fuzzing the fragment in the url. - URL_FRAGMENT = 9 - - # The attack comes from fuzzing the HTML comments. - HTML_COMMENT = 10 - - # The attack comes from fuzzing the POST parameters. - POST_PARAMETERS = 11 - - # The attack comes from fuzzing the protocol. - PROTOCOL = 12 - - # The attack comes from the server side and is stored. - STORED_XSS = 13 - - # The attack is a Same-Origin Method Execution attack via a GET parameter. - SAME_ORIGIN = 14 - - # The attack payload is received from a third-party host via a URL that is - # user-controllable - USER_CONTROLLABLE_URL = 15 - end - end - - # Information reported for an XXE. - # @!attribute [rw] payload_value - # @return [::String] - # The XML string that triggered the XXE vulnerability. Non-payload values - # might be redacted. - # @!attribute [rw] payload_location - # @return [::Google::Cloud::WebSecurityScanner::V1::Xxe::Location] - # Location within the request where the payload was placed. - class Xxe - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Locations within a request where XML was substituted. - module Location - # Unknown Location. - LOCATION_UNSPECIFIED = 0 - - # The XML payload replaced the complete request body. - COMPLETE_REQUEST_BODY = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_type_stats.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_type_stats.rb deleted file mode 100644 index d7c9d4981c94..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/finding_type_stats.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1 - # A FindingTypeStats resource represents stats regarding a specific FindingType - # of Findings under a given ScanRun. - # @!attribute [rw] finding_type - # @return [::String] - # Output only. The finding type associated with the stats. - # @!attribute [rw] finding_count - # @return [::Integer] - # Output only. The count of findings belonging to this finding type. - class FindingTypeStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config.rb deleted file mode 100644 index b09c2e974d3b..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config.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 WebSecurityScanner - module V1 - # A ScanConfig resource contains the configurations to launch a scan. - # @!attribute [rw] name - # @return [::String] - # The resource name of the ScanConfig. The name follows the format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. The ScanConfig IDs are - # generated by the system. - # @!attribute [rw] display_name - # @return [::String] - # Required. The user provided display name of the ScanConfig. - # @!attribute [rw] max_qps - # @return [::Integer] - # The maximum QPS during scanning. A valid value ranges from 5 to 20 - # inclusively. If the field is unspecified or its value is set 0, server will - # default to 15. Other values outside of [5, 20] range will be rejected with - # INVALID_ARGUMENT error. - # @!attribute [rw] starting_urls - # @return [::Array<::String>] - # Required. The starting URLs from which the scanner finds site pages. - # @!attribute [rw] authentication - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication] - # The authentication configuration. If specified, service will use the - # authentication configuration during scanning. - # @!attribute [rw] user_agent - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::UserAgent] - # The user agent used during scanning. - # @!attribute [rw] blacklist_patterns - # @return [::Array<::String>] - # The excluded URL patterns as described in - # https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls - # @!attribute [rw] schedule - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Schedule] - # The schedule of the ScanConfig. - # @!attribute [rw] export_to_security_command_center - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::ExportToSecurityCommandCenter] - # Controls export of scan configurations and results to Security - # Command Center. - # @!attribute [rw] risk_level - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::RiskLevel] - # The risk level selected for the scan - # @!attribute [rw] managed_scan - # @return [::Boolean] - # Whether the scan config is managed by Web Security Scanner, output - # only. - # @!attribute [rw] static_ip_scan - # @return [::Boolean] - # Whether the scan configuration has enabled static IP address scan feature. - # If enabled, the scanner will access applications from static IP addresses. - # @!attribute [rw] ignore_http_status_errors - # @return [::Boolean] - # Whether to keep scanning even if most requests return HTTP error codes. - class ScanConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Scan authentication configuration. - # @!attribute [rw] google_account - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication::GoogleAccount] - # Authentication using a Google account. - # - # Note: The following fields are mutually exclusive: `google_account`, `custom_account`, `iap_credential`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_account - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication::CustomAccount] - # Authentication using a custom account. - # - # Note: The following fields are mutually exclusive: `custom_account`, `google_account`, `iap_credential`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] iap_credential - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication::IapCredential] - # Authentication using Identity-Aware-Proxy (IAP). - # - # Note: The following fields are mutually exclusive: `iap_credential`, `google_account`, `custom_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Authentication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes authentication configuration that uses a Google account. - # @deprecated This message is deprecated and may be removed in the next major version update. - # @!attribute [rw] username - # @return [::String] - # Required. The user name of the Google account. - # @!attribute [rw] password - # @return [::String] - # Required. Input only. The password of the Google account. The credential is stored encrypted - # and not returned in any response nor included in audit logs. - class GoogleAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes authentication configuration that uses a custom account. - # @!attribute [rw] username - # @return [::String] - # Required. The user name of the custom account. - # @!attribute [rw] password - # @return [::String] - # Required. Input only. The password of the custom account. The credential is stored encrypted - # and not returned in any response nor included in audit logs. - # @!attribute [rw] login_url - # @return [::String] - # Required. The login form URL of the website. - class CustomAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes authentication configuration for Identity-Aware-Proxy (IAP). - # @!attribute [rw] iap_test_service_account_info - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig::Authentication::IapCredential::IapTestServiceAccountInfo] - # Authentication configuration when Web-Security-Scanner service - # account is added in Identity-Aware-Proxy (IAP) access policies. - class IapCredential - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes authentication configuration when Web-Security-Scanner - # service account is added in Identity-Aware-Proxy (IAP) access policies. - # @!attribute [rw] target_audience_client_id - # @return [::String] - # Required. Describes OAuth2 client id of resources protected by - # Identity-Aware-Proxy (IAP). - class IapTestServiceAccountInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Scan schedule configuration. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # A timestamp indicates when the next run will be scheduled. The value is - # refreshed by the server after each run. If unspecified, it will default - # to current server time, which means the scan will be scheduled to start - # immediately. - # @!attribute [rw] interval_duration_days - # @return [::Integer] - # Required. The duration of time between executions in days. - class Schedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of user agents used for scanning. - module UserAgent - # The user agent is unknown. Service will default to CHROME_LINUX. - USER_AGENT_UNSPECIFIED = 0 - - # Chrome on Linux. This is the service default if unspecified. - CHROME_LINUX = 1 - - # Chrome on Android. - CHROME_ANDROID = 2 - - # Safari on IPhone. - SAFARI_IPHONE = 3 - end - - # Scan risk levels supported by Web Security Scanner. LOW impact - # scanning will minimize requests with the potential to modify data. To - # achieve the maximum scan coverage, NORMAL risk level is recommended. - module RiskLevel - # Use default, which is NORMAL. - RISK_LEVEL_UNSPECIFIED = 0 - - # Normal scanning (Recommended) - NORMAL = 1 - - # Lower impact scanning - LOW = 2 - end - - # Controls export of scan configurations and results to Security - # Command Center. - module ExportToSecurityCommandCenter - # Use default, which is ENABLED. - EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0 - - # Export results of this scan to Security Command Center. - ENABLED = 1 - - # Do not export results of this scan to Security Command Center. - DISABLED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config_error.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config_error.rb deleted file mode 100644 index d8e3b62c7efe..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_config_error.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 WebSecurityScanner - module V1 - # Defines a custom error message used by CreateScanConfig and UpdateScanConfig - # APIs when scan configuration validation fails. It is also reported as part of - # a ScanRunErrorTrace message if scan validation fails due to a scan - # configuration error. - # @!attribute [rw] code - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfigError::Code] - # Output only. Indicates the reason code for a configuration failure. - # @!attribute [rw] field_name - # @return [::String] - # Output only. Indicates the full name of the ScanConfig field that triggers this error, - # for example "scan_config.max_qps". This field is provided for - # troubleshooting purposes only and its actual value can change in the - # future. - class ScanConfigError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. - # Defines an error reason code. - # Next id: 44 - module Code - # There is no error. - CODE_UNSPECIFIED = 0 - - # There is no error. - OK = 0 - - # Indicates an internal server error. - # Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown. - INTERNAL_ERROR = 1 - - # One of the seed URLs is an App Engine URL but we cannot validate the scan - # settings due to an App Engine API backend error. - APPENGINE_API_BACKEND_ERROR = 2 - - # One of the seed URLs is an App Engine URL but we cannot access the - # App Engine API to validate scan settings. - APPENGINE_API_NOT_ACCESSIBLE = 3 - - # One of the seed URLs is an App Engine URL but the Default Host of the - # App Engine is not set. - APPENGINE_DEFAULT_HOST_MISSING = 4 - - # Google corporate accounts can not be used for scanning. - CANNOT_USE_GOOGLE_COM_ACCOUNT = 6 - - # The account of the scan creator can not be used for scanning. - CANNOT_USE_OWNER_ACCOUNT = 7 - - # This scan targets Compute Engine, but we cannot validate scan settings - # due to a Compute Engine API backend error. - COMPUTE_API_BACKEND_ERROR = 8 - - # This scan targets Compute Engine, but we cannot access the Compute Engine - # API to validate the scan settings. - COMPUTE_API_NOT_ACCESSIBLE = 9 - - # The Custom Login URL does not belong to the current project. - CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10 - - # The Custom Login URL is malformed (can not be parsed). - CUSTOM_LOGIN_URL_MALFORMED = 11 - - # The Custom Login URL is mapped to a non-routable IP address in DNS. - CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12 - - # The Custom Login URL is mapped to an IP address which is not reserved for - # the current project. - CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13 - - # The Custom Login URL has a non-routable IP address. - CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14 - - # The Custom Login URL has an IP address which is not reserved for the - # current project. - CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15 - - # Another scan with the same name (case-sensitive) already exists. - DUPLICATE_SCAN_NAME = 16 - - # A field is set to an invalid value. - INVALID_FIELD_VALUE = 18 - - # There was an error trying to authenticate to the scan target. - FAILED_TO_AUTHENTICATE_TO_TARGET = 19 - - # Finding type value is not specified in the list findings request. - FINDING_TYPE_UNSPECIFIED = 20 - - # Scan targets Compute Engine, yet current project was not whitelisted for - # Google Compute Engine Scanning Alpha access. - FORBIDDEN_TO_SCAN_COMPUTE = 21 - - # User tries to update managed scan - FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43 - - # The supplied filter is malformed. For example, it can not be parsed, does - # not have a filter type in expression, or the same filter type appears - # more than once. - MALFORMED_FILTER = 22 - - # The supplied resource name is malformed (can not be parsed). - MALFORMED_RESOURCE_NAME = 23 - - # The current project is not in an active state. - PROJECT_INACTIVE = 24 - - # A required field is not set. - REQUIRED_FIELD = 25 - - # Project id, scanconfig id, scanrun id, or finding id are not consistent - # with each other in resource name. - RESOURCE_NAME_INCONSISTENT = 26 - - # The scan being requested to start is already running. - SCAN_ALREADY_RUNNING = 27 - - # The scan that was requested to be stopped is not running. - SCAN_NOT_RUNNING = 28 - - # One of the seed URLs does not belong to the current project. - SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29 - - # One of the seed URLs is malformed (can not be parsed). - SEED_URL_MALFORMED = 30 - - # One of the seed URLs is mapped to a non-routable IP address in DNS. - SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31 - - # One of the seed URLs is mapped to an IP address which is not reserved - # for the current project. - SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32 - - # One of the seed URLs has on-routable IP address. - SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33 - - # One of the seed URLs has an IP address that is not reserved - # for the current project. - SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35 - - # The Web Security Scanner service account is not configured under the - # project. - SERVICE_ACCOUNT_NOT_CONFIGURED = 36 - - # A project has reached the maximum number of scans. - TOO_MANY_SCANS = 37 - - # Resolving the details of the current project fails. - UNABLE_TO_RESOLVE_PROJECT_INFO = 38 - - # One or more blacklist patterns were in the wrong format. - UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39 - - # The supplied filter is not supported. - UNSUPPORTED_FILTER = 40 - - # The supplied finding type is not supported. For example, we do not - # provide findings of the given finding type. - UNSUPPORTED_FINDING_TYPE = 41 - - # The URL scheme of one or more of the supplied URLs is not supported. - UNSUPPORTED_URL_SCHEME = 42 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run.rb deleted file mode 100644 index a7b461044a50..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run.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 WebSecurityScanner - module V1 - # A ScanRun is a output-only resource representing an actual run of the scan. - # Next id: 12 - # @!attribute [rw] name - # @return [::String] - # Output only. The resource name of the ScanRun. The name follows the format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # The ScanRun IDs are generated by the system. - # @!attribute [rw] execution_state - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun::ExecutionState] - # Output only. The execution state of the ScanRun. - # @!attribute [rw] result_state - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun::ResultState] - # Output only. The result state of the ScanRun. This field is only available after the - # execution state reaches "FINISHED". - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the ScanRun started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the ScanRun reached termination state - that the ScanRun - # is either finished or stopped by user. - # @!attribute [rw] urls_crawled_count - # @return [::Integer] - # Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, - # the value represents the number of URLs crawled up to now. - # @!attribute [rw] urls_tested_count - # @return [::Integer] - # Output only. The number of URLs tested during this ScanRun. If the scan is in progress, - # the value represents the number of URLs tested up to now. The number of - # URLs tested is usually larger than the number URLS crawled because - # typically a crawled URL is tested with multiple test payloads. - # @!attribute [rw] has_vulnerabilities - # @return [::Boolean] - # Output only. Whether the scan run has found any vulnerabilities. - # @!attribute [rw] progress_percent - # @return [::Integer] - # Output only. The percentage of total completion ranging from 0 to 100. - # If the scan is in queue, the value is 0. - # If the scan is running, the value ranges from 0 to 100. - # If the scan is finished, the value is 100. - # @!attribute [rw] error_trace - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRunErrorTrace] - # Output only. If result_state is an ERROR, this field provides the primary reason for - # scan's termination and more details, if such are available. - # @!attribute [rw] warning_traces - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::ScanRunWarningTrace>] - # Output only. A list of warnings, if such are encountered during this scan run. - class ScanRun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of ScanRun execution state. - module ExecutionState - # Represents an invalid state caused by internal server error. This value - # should never be returned. - EXECUTION_STATE_UNSPECIFIED = 0 - - # The scan is waiting in the queue. - QUEUED = 1 - - # The scan is in progress. - SCANNING = 2 - - # The scan is either finished or stopped by user. - FINISHED = 3 - end - - # Types of ScanRun result state. - module ResultState - # Default value. This value is returned when the ScanRun is not yet - # finished. - RESULT_STATE_UNSPECIFIED = 0 - - # The scan finished without errors. - SUCCESS = 1 - - # The scan finished with errors. - ERROR = 2 - - # The scan was terminated by user. - KILLED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_error_trace.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_error_trace.rb deleted file mode 100644 index c5e493b73771..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_error_trace.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 WebSecurityScanner - module V1 - # Output only. - # Defines an error trace message for a ScanRun. - # @!attribute [rw] code - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRunErrorTrace::Code] - # Output only. Indicates the error reason code. - # @!attribute [rw] scan_config_error - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfigError] - # Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error - # message encountered during scan configuration validation that is performed - # before each scan run. - # @!attribute [rw] most_common_http_error_code - # @return [::Integer] - # Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most - # common HTTP error code, if such is available. For example, if this code is - # 404, the scan has encountered too many NOT_FOUND responses. - class ScanRunErrorTrace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. - # Defines an error reason code. - # Next id: 8 - module Code - # Default value is never used. - CODE_UNSPECIFIED = 0 - - # Indicates that the scan run failed due to an internal server error. - INTERNAL_ERROR = 1 - - # Indicates a scan configuration error, usually due to outdated ScanConfig - # settings, such as starting_urls or the DNS configuration. - SCAN_CONFIG_ISSUE = 2 - - # Indicates an authentication error, usually due to outdated ScanConfig - # authentication settings. - AUTHENTICATION_CONFIG_ISSUE = 3 - - # Indicates a scan operation timeout, usually caused by a very large site. - TIMED_OUT_WHILE_SCANNING = 4 - - # Indicates that a scan encountered excessive redirects, either to - # authentication or some other page outside of the scan scope. - TOO_MANY_REDIRECTS = 5 - - # Indicates that a scan encountered numerous errors from the web site - # pages. When available, most_common_http_error_code field indicates the - # most common HTTP error code encountered during the scan. - TOO_MANY_HTTP_ERRORS = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_log.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_log.rb deleted file mode 100644 index dcf836b52240..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_log.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1 - # A ScanRunLog is an output-only proto used for Stackdriver customer logging. - # It is used for logs covering the start and end of scan pipelines. - # Other than an added summary, this is a subset of the ScanRun. - # Representation in logs is either a proto Struct, or converted to JSON. - # Next id: 9 - # @!attribute [rw] summary - # @return [::String] - # Human friendly message about the event. - # @!attribute [rw] name - # @return [::String] - # The resource name of the ScanRun being logged. - # @!attribute [rw] execution_state - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun::ExecutionState] - # The execution state of the ScanRun. - # @!attribute [rw] result_state - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRun::ResultState] - # The result state of the ScanRun. - # @!attribute [rw] urls_crawled_count - # @return [::Integer] - # @!attribute [rw] urls_tested_count - # @return [::Integer] - # @!attribute [rw] has_findings - # @return [::Boolean] - # @!attribute [rw] error_trace - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRunErrorTrace] - class ScanRunLog - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_warning_trace.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_warning_trace.rb deleted file mode 100644 index c6d38093f5ee..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/scan_run_warning_trace.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1 - # Output only. - # Defines a warning trace message for ScanRun. Warning traces provide customers - # with useful information that helps make the scanning process more effective. - # @!attribute [rw] code - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanRunWarningTrace::Code] - # Output only. Indicates the warning code. - class ScanRunWarningTrace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. - # Defines a warning message code. - # Next id: 6 - module Code - # Default value is never used. - CODE_UNSPECIFIED = 0 - - # Indicates that a scan discovered an unexpectedly low number of URLs. This - # is sometimes caused by complex navigation features or by using a single - # URL for numerous pages. - INSUFFICIENT_CRAWL_RESULTS = 1 - - # Indicates that a scan discovered too many URLs to test, or excessive - # redundant URLs. - TOO_MANY_CRAWL_RESULTS = 2 - - # Indicates that too many tests have been generated for the scan. Customer - # should try reducing the number of starting URLs, increasing the QPS rate, - # or narrowing down the scope of the scan using the excluded patterns. - TOO_MANY_FUZZ_TASKS = 3 - - # Indicates that a scan is blocked by IAP. - BLOCKED_BY_IAP = 4 - - # Indicates that no seeds is found for a scan - NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN = 5 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/web_security_scanner.rb deleted file mode 100644 index 218897aed41e..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/cloud/websecurityscanner/v1/web_security_scanner.rb +++ /dev/null @@ -1,278 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1 - # Request for the `CreateScanConfig` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name where the scan is created, which should be a - # project resource name in the format 'projects/\\{projectId}'. - # @!attribute [rw] scan_config - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # Required. The ScanConfig to be created. - class CreateScanConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteScanConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanConfig to be deleted. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - class DeleteScanConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetScanConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanConfig to be returned. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - class GetScanConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListScanConfigs` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a project resource name in the - # format 'projects/\\{projectId}'. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of ScanConfigs to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - class ListScanConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateScanConfigRequest` method. - # @!attribute [rw] scan_config - # @return [::Google::Cloud::WebSecurityScanner::V1::ScanConfig] - # Required. The ScanConfig to be updated. The name field must be set to identify the - # resource to be updated. The values of fields not covered by the mask - # will be ignored. - # @!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 UpdateScanConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListScanConfigs` method. - # @!attribute [rw] scan_configs - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::ScanConfig>] - # The list of ScanConfigs returned. - # @!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 ListScanConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `StartScanRun` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanConfig to be used. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - class StartScanRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetScanRun` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanRun to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - class GetScanRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListScanRuns` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a scan resource name in the - # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of ScanRuns to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - class ListScanRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListScanRuns` method. - # @!attribute [rw] scan_runs - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::ScanRun>] - # The list of ScanRuns returned. - # @!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 ListScanRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `StopScanRun` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanRun to be stopped. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - class StopScanRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListCrawledUrls` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of CrawledUrls to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - class ListCrawledUrlsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListCrawledUrls` method. - # @!attribute [rw] crawled_urls - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::CrawledUrl>] - # The list of CrawledUrls returned. - # @!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 ListCrawledUrlsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetFinding` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Finding to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. - class GetFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListFindings` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @!attribute [rw] filter - # @return [::String] - # The filter expression. The expression must be in the format: - # . - # Supported field: 'finding_type'. - # Supported operator: '='. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of Findings to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - class ListFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListFindings` method. - # @!attribute [rw] findings - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::Finding>] - # The list of Findings returned. - # @!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 ListFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListFindingTypeStats` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - class ListFindingTypeStatsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListFindingTypeStats` method. - # @!attribute [rw] finding_type_stats - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1::FindingTypeStats>] - # The list of FindingTypeStats returned. - class ListFindingTypeStatsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/Gemfile deleted file mode 100644 index 9c79128c7f82..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1", path: "../" -else - gem "google-cloud-web_security_scanner-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-web_security_scanner-v1/snippets/snippet_metadata_google.cloud.websecurityscanner.v1.json b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/snippet_metadata_google.cloud.websecurityscanner.v1.json deleted file mode 100644 index ff90b544b895..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/snippet_metadata_google.cloud.websecurityscanner.v1.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-web_security_scanner-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.websecurityscanner.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_CreateScanConfig_sync", - "title": "Snippet for the create_scan_config call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#create_scan_config.", - "file": "web_security_scanner/create_scan_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_scan_config", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#create_scan_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanConfig", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "CreateScanConfig", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.CreateScanConfig", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_DeleteScanConfig_sync", - "title": "Snippet for the delete_scan_config call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#delete_scan_config.", - "file": "web_security_scanner/delete_scan_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_scan_config", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#delete_scan_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "DeleteScanConfig", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.DeleteScanConfig", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_GetScanConfig_sync", - "title": "Snippet for the get_scan_config call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_config.", - "file": "web_security_scanner/get_scan_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_scan_config", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanConfig", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "GetScanConfig", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.GetScanConfig", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListScanConfigs_sync", - "title": "Snippet for the list_scan_configs call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_configs.", - "file": "web_security_scanner/list_scan_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scan_configs", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListScanConfigs", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListScanConfigs", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_UpdateScanConfig_sync", - "title": "Snippet for the update_scan_config call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#update_scan_config.", - "file": "web_security_scanner/update_scan_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_scan_config", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#update_scan_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanConfig", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "UpdateScanConfig", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.UpdateScanConfig", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_StartScanRun_sync", - "title": "Snippet for the start_scan_run call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#start_scan_run.", - "file": "web_security_scanner/start_scan_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_scan_run", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#start_scan_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanRun", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "StartScanRun", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.StartScanRun", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_GetScanRun_sync", - "title": "Snippet for the get_scan_run call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_run.", - "file": "web_security_scanner/get_scan_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_scan_run", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanRun", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "GetScanRun", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.GetScanRun", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_sync", - "title": "Snippet for the list_scan_runs call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_runs.", - "file": "web_security_scanner/list_scan_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scan_runs", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListScanRuns", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListScanRuns", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_StopScanRun_sync", - "title": "Snippet for the stop_scan_run call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#stop_scan_run.", - "file": "web_security_scanner/stop_scan_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "stop_scan_run", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#stop_scan_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ScanRun", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "StopScanRun", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.StopScanRun", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_sync", - "title": "Snippet for the list_crawled_urls call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_crawled_urls.", - "file": "web_security_scanner/list_crawled_urls.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_crawled_urls", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_crawled_urls", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListCrawledUrls", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListCrawledUrls", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_GetFinding_sync", - "title": "Snippet for the get_finding call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_finding.", - "file": "web_security_scanner/get_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_finding", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::Finding", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "GetFinding", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.GetFinding", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListFindings_sync", - "title": "Snippet for the list_findings call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_findings.", - "file": "web_security_scanner/list_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_findings", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListFindings", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListFindings", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1_generated_WebSecurityScanner_ListFindingTypeStats_sync", - "title": "Snippet for the list_finding_type_stats call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_finding_type_stats.", - "file": "web_security_scanner/list_finding_type_stats.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_finding_type_stats", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_finding_type_stats", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListFindingTypeStats", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner.ListFindingTypeStats", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1.WebSecurityScanner" - } - } - }, - "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-web_security_scanner-v1/snippets/web_security_scanner/create_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/create_scan_config.rb deleted file mode 100644 index 3411dbe3c686..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/create_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_CreateScanConfig_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the create_scan_config call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#create_scan_config. -# -def create_scan_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new - - # Call the create_scan_config method. - result = client.create_scan_config request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. - p result -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_CreateScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/delete_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/delete_scan_config.rb deleted file mode 100644 index 3c3c38833327..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/delete_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_DeleteScanConfig_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the delete_scan_config call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#delete_scan_config. -# -def delete_scan_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new - - # Call the delete_scan_config method. - result = client.delete_scan_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_DeleteScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_finding.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_finding.rb deleted file mode 100644 index 7264a0da4ec4..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START websecurityscanner_v1_generated_WebSecurityScanner_GetFinding_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the get_finding call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_finding. -# -def get_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new - - # Call the get_finding method. - result = client.get_finding request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1::Finding. - p result -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_GetFinding_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_config.rb deleted file mode 100644 index e98d311e44c2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_GetScanConfig_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the get_scan_config call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_config. -# -def get_scan_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new - - # Call the get_scan_config method. - result = client.get_scan_config request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. - p result -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_GetScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_run.rb deleted file mode 100644 index 81e3f63c8ea6..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/get_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_GetScanRun_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the get_scan_run call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#get_scan_run. -# -def get_scan_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new - - # Call the get_scan_run method. - result = client.get_scan_run request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. - p result -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_GetScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_crawled_urls.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_crawled_urls.rb deleted file mode 100644 index c168ec342ee5..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_crawled_urls.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the list_crawled_urls call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_crawled_urls. -# -def list_crawled_urls - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new - - # Call the list_crawled_urls method. - result = client.list_crawled_urls request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::CrawledUrl. - p item - end -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_ListCrawledUrls_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_finding_type_stats.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_finding_type_stats.rb deleted file mode 100644 index b86e8985075e..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_finding_type_stats.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START websecurityscanner_v1_generated_WebSecurityScanner_ListFindingTypeStats_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the list_finding_type_stats call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_finding_type_stats. -# -def list_finding_type_stats - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new - - # Call the list_finding_type_stats method. - result = client.list_finding_type_stats request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse. - p result -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_ListFindingTypeStats_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_findings.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_findings.rb deleted file mode 100644 index cfc4dc3cb5fb..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START websecurityscanner_v1_generated_WebSecurityScanner_ListFindings_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the list_findings call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_findings. -# -def list_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new - - # Call the list_findings method. - result = client.list_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WebSecurityScanner::V1::Finding. - p item - end -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_configs.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_configs.rb deleted file mode 100644 index fa3fbb15c6b2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_ListScanConfigs_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the list_scan_configs call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_configs. -# -def list_scan_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new - - # Call the list_scan_configs method. - result = client.list_scan_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::WebSecurityScanner::V1::ScanConfig. - p item - end -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_ListScanConfigs_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_runs.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_runs.rb deleted file mode 100644 index 57fa3759c1f3..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/list_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the list_scan_runs call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#list_scan_runs. -# -def list_scan_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new - - # Call the list_scan_runs method. - result = client.list_scan_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::WebSecurityScanner::V1::ScanRun. - p item - end -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_ListScanRuns_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/start_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/start_scan_run.rb deleted file mode 100644 index 4ec4ae4d692e..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/start_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_StartScanRun_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the start_scan_run call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#start_scan_run. -# -def start_scan_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new - - # Call the start_scan_run method. - result = client.start_scan_run request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. - p result -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_StartScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/stop_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/stop_scan_run.rb deleted file mode 100644 index 4c9a5b9df3ef..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/stop_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_StopScanRun_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the stop_scan_run call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#stop_scan_run. -# -def stop_scan_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new - - # Call the stop_scan_run method. - result = client.stop_scan_run request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanRun. - p result -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_StopScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/update_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/update_scan_config.rb deleted file mode 100644 index 69d927b6d8f7..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/snippets/web_security_scanner/update_scan_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 websecurityscanner_v1_generated_WebSecurityScanner_UpdateScanConfig_sync] -require "google/cloud/web_security_scanner/v1" - -## -# Snippet for the update_scan_config call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client#update_scan_config. -# -def update_scan_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new - - # Call the update_scan_config method. - result = client.update_scan_config request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1::ScanConfig. - p result -end -# [END websecurityscanner_v1_generated_WebSecurityScanner_UpdateScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_rest_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_rest_test.rb deleted file mode 100644 index 53d4f0c97247..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_rest_test.rb +++ /dev/null @@ -1,812 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/websecurityscanner/v1/web_security_scanner_pb" -require "google/cloud/web_security_scanner/v1/web_security_scanner/rest" - - -class ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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_scan_config - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - scan_config = {} - - create_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_create_scan_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_scan_config({ parent: parent, scan_config: scan_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_scan_config parent: parent, scan_config: scan_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_scan_config ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_scan_config({ parent: parent, scan_config: scan_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_scan_config(::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_scan_config_client_stub.call_count - end - end - end - - def test_delete_scan_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_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_delete_scan_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_scan_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_scan_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_scan_config ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_scan_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_scan_config(::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_scan_config_client_stub.call_count - end - end - end - - def test_get_scan_config - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_scan_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_scan_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_scan_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_scan_config ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_scan_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_scan_config(::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_scan_config_client_stub.call_count - end - end - end - - def test_list_scan_configs - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse.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_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_scan_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scan_configs_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_scan_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_scan_configs ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_scan_configs(::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.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_scan_configs_client_stub.call_count - end - end - end - - def test_update_scan_config - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scan_config = {} - update_mask = {} - - update_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_update_scan_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_scan_config scan_config: scan_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_scan_config ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new(scan_config: scan_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_scan_config(::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new(scan_config: scan_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_scan_config_client_stub.call_count - end - end - end - - def test_start_scan_run - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - start_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_start_scan_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_scan_run ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_scan_run(::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_scan_run_client_stub.call_count - end - end - end - - def test_get_scan_run - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_scan_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_scan_run ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_scan_run(::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_scan_run_client_stub.call_count - end - end - end - - def test_list_scan_runs - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse.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_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_scan_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scan_runs_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_scan_runs parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_scan_runs ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_scan_runs(::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.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_scan_runs_client_stub.call_count - end - end - end - - def test_stop_scan_run - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - stop_scan_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::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_stop_scan_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, stop_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.stop_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.stop_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.stop_scan_run ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.stop_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.stop_scan_run(::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, stop_scan_run_client_stub.call_count - end - end - end - - def test_list_crawled_urls - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse.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_crawled_urls_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_crawled_urls_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_crawled_urls_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_crawled_urls parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_crawled_urls ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_crawled_urls(::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.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_crawled_urls_client_stub.call_count - end - end - end - - def test_get_finding - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_finding_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_finding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_finding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_finding ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_finding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_finding(::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_finding_client_stub.call_count - end - end - end - - def test_list_findings - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_findings parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_findings ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_findings(::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_count - end - end - end - - def test_list_finding_type_stats - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - list_finding_type_stats_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_finding_type_stats_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_finding_type_stats_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_finding_type_stats({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_finding_type_stats parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_finding_type_stats ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_finding_type_stats({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_finding_type_stats(::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_finding_type_stats_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::WebSecurityScanner::V1::WebSecurityScanner::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::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_test.rb deleted file mode 100644 index c27970e14144..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/test/google/cloud/web_security_scanner/v1/web_security_scanner_test.rb +++ /dev/null @@ -1,900 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/websecurityscanner/v1/web_security_scanner_pb" -require "google/cloud/web_security_scanner/v1/web_security_scanner" - -class ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::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_scan_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - scan_config = {} - - create_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_scan_config, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebSecurityScanner::V1::ScanConfig), request["scan_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_scan_config({ parent: parent, scan_config: scan_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_scan_config parent: parent, scan_config: scan_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_scan_config ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_scan_config({ parent: parent, scan_config: scan_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_scan_config(::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_scan_config_client_stub.call_rpc_count - end - end - - def test_delete_scan_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_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_scan_config, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_scan_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_scan_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_scan_config ::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_scan_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_scan_config(::Google::Cloud::WebSecurityScanner::V1::DeleteScanConfigRequest.new(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_scan_config_client_stub.call_rpc_count - end - end - - def test_get_scan_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_scan_config, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_scan_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_scan_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_scan_config ::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_scan_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_scan_config(::Google::Cloud::WebSecurityScanner::V1::GetScanConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_scan_config_client_stub.call_rpc_count - end - end - - def test_list_scan_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_scan_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scan_configs, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest, 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_scan_configs_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_scan_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_scan_configs ::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_scan_configs(::Google::Cloud::WebSecurityScanner::V1::ListScanConfigsRequest.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_scan_configs_client_stub.call_rpc_count - end - end - - def test_update_scan_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scan_config = {} - update_mask = {} - - update_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_scan_config, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebSecurityScanner::V1::ScanConfig), request["scan_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_scan_config scan_config: scan_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_scan_config ::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new(scan_config: scan_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_scan_config({ scan_config: scan_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 - client.update_scan_config(::Google::Cloud::WebSecurityScanner::V1::UpdateScanConfigRequest.new(scan_config: scan_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_scan_config_client_stub.call_rpc_count - end - end - - def test_start_scan_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_scan_run, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_scan_run ::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_scan_run({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_scan_run(::Google::Cloud::WebSecurityScanner::V1::StartScanRunRequest.new(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_scan_run_client_stub.call_rpc_count - end - end - - def test_get_scan_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_scan_run, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_scan_run ::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_scan_run({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_scan_run(::Google::Cloud::WebSecurityScanner::V1::GetScanRunRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_scan_run_client_stub.call_rpc_count - end - end - - def test_list_scan_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_scan_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scan_runs, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest, 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_scan_runs_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_scan_runs parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_scan_runs ::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_scan_runs(::Google::Cloud::WebSecurityScanner::V1::ListScanRunsRequest.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_scan_runs_client_stub.call_rpc_count - end - end - - def test_stop_scan_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ScanRun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :stop_scan_run, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, stop_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.stop_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.stop_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.stop_scan_run ::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.stop_scan_run({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.stop_scan_run(::Google::Cloud::WebSecurityScanner::V1::StopScanRunRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, stop_scan_run_client_stub.call_rpc_count - end - end - - def test_list_crawled_urls - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_crawled_urls_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_crawled_urls, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest, 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_crawled_urls_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_crawled_urls parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_crawled_urls ::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_crawled_urls(::Google::Cloud::WebSecurityScanner::V1::ListCrawledUrlsRequest.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_crawled_urls_client_stub.call_rpc_count - end - end - - def test_get_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_finding, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_finding_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_finding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_finding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_finding ::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_finding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_finding(::Google::Cloud::WebSecurityScanner::V1::GetFindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_finding_client_stub.call_rpc_count - end - end - - def test_list_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_findings, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_findings_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_findings parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_findings ::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_findings(::Google::Cloud::WebSecurityScanner::V1::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_rpc_count - end - end - - def test_list_finding_type_stats - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - list_finding_type_stats_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_finding_type_stats, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_finding_type_stats_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_finding_type_stats({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_finding_type_stats parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_finding_type_stats ::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new(parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_finding_type_stats({ parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_finding_type_stats(::Google::Cloud::WebSecurityScanner::V1::ListFindingTypeStatsRequest.new(parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_finding_type_stats_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::WebSecurityScanner::V1::WebSecurityScanner::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::WebSecurityScanner::V1::WebSecurityScanner::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::WebSecurityScanner::V1::WebSecurityScanner::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1/test/helper.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.repo-metadata.json deleted file mode 100644 index 080aad677a51..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "websecurityscanner.googleapis.com", - "api_shortname": "websecurityscanner", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1beta/latest", - "distribution_name": "google-cloud-web_security_scanner-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "websecurityscanner", - "name_pretty": "Web Security Scanner V1beta API", - "product_documentation": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. Note that google-cloud-web_security_scanner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_security_scanner instead. See the readme for more details.", - "ruby-cloud-env-prefix": "WEB_SECURITY_SCANNER", - "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.rubocop.yml deleted file mode 100644 index e051a212551a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-web_security_scanner-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-web_security_scanner-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.toys.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/.yardopts b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.yardopts deleted file mode 100644 index a098711b250d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Web Security Scanner 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-web_security_scanner-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/AUTHENTICATION.md deleted file mode 100644 index e955035f32bf..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-web_security_scanner-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-web_security_scanner-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/web_security_scanner/v1beta" - -client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/web_security_scanner/v1beta" - -::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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-web_security_scanner-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/web_security_scanner/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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-web_security_scanner-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/README.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/README.md deleted file mode 100644 index a908e25d8d6d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Web Security Scanner V1beta API - -Scans your Compute and App Engine apps for common web vulnerabilities. - -Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Web Security Scanner V1beta API. Most users should consider using -the main client gem, -[google-cloud-web_security_scanner](https://rubygems.org/gems/google-cloud-web_security_scanner). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-web_security_scanner-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/websecurityscanner.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/web_security_scanner/v1beta" - -client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new -request = ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new # (request fields as keyword arguments...) -response = client.create_scan_config request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-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/web_security_scanner/v1beta" -require "logger" - -client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-web_security_scanner`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-web_security_scanner-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-web_security_scanner`. -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-web_security_scanner-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-web_security_scanner-v1beta/Rakefile b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/Rakefile deleted file mode 100644 index 32e97681638d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WEB_SECURITY_SCANNER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WEB_SECURITY_SCANNER_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 WEB_SECURITY_SCANNER_TEST_PROJECT=test123 WEB_SECURITY_SCANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials" - ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WEB_SECURITY_SCANNER_PROJECT"] = project - ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] = project - ENV["WEB_SECURITY_SCANNER_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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-web_security_scanner-v1beta" - header "google-cloud-web_security_scanner-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-web_security_scanner-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-web_security_scanner-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-web_security_scanner-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-web_security_scanner-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-web_security_scanner-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/gapic_metadata.json deleted file mode 100644 index c625db81d1c2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/gapic_metadata.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.websecurityscanner.v1beta", - "libraryPackage": "::Google::Cloud::WebSecurityScanner::V1beta", - "services": { - "WebSecurityScanner": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client", - "rpcs": { - "CreateScanConfig": { - "methods": [ - "create_scan_config" - ] - }, - "DeleteScanConfig": { - "methods": [ - "delete_scan_config" - ] - }, - "GetScanConfig": { - "methods": [ - "get_scan_config" - ] - }, - "ListScanConfigs": { - "methods": [ - "list_scan_configs" - ] - }, - "UpdateScanConfig": { - "methods": [ - "update_scan_config" - ] - }, - "StartScanRun": { - "methods": [ - "start_scan_run" - ] - }, - "GetScanRun": { - "methods": [ - "get_scan_run" - ] - }, - "ListScanRuns": { - "methods": [ - "list_scan_runs" - ] - }, - "StopScanRun": { - "methods": [ - "stop_scan_run" - ] - }, - "ListCrawledUrls": { - "methods": [ - "list_crawled_urls" - ] - }, - "GetFinding": { - "methods": [ - "get_finding" - ] - }, - "ListFindings": { - "methods": [ - "list_findings" - ] - }, - "ListFindingTypeStats": { - "methods": [ - "list_finding_type_stats" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/google-cloud-web_security_scanner-v1beta.gemspec b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/google-cloud-web_security_scanner-v1beta.gemspec deleted file mode 100644 index 46d14b4a6be3..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/google-cloud-web_security_scanner-v1beta.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/web_security_scanner/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-web_security_scanner-v1beta" - gem.version = Google::Cloud::WebSecurityScanner::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. Note that google-cloud-web_security_scanner-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-web_security_scanner instead. See the readme for more details." - gem.summary = "Scans your Compute and App Engine apps for common web vulnerabilities." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-v1beta.rb deleted file mode 100644 index aa99555f2dd3..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google-cloud-web_security_scanner-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/web_security_scanner/v1beta" diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta.rb deleted file mode 100644 index 42ef3ae8aa7c..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/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/web_security_scanner/v1beta/web_security_scanner" -require "google/cloud/web_security_scanner/v1beta/version" - -module Google - module Cloud - module WebSecurityScanner - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/web_security_scanner/v1beta" - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/web_security_scanner/v1beta" - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - module V1beta - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/web_security_scanner/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb deleted file mode 100644 index 3c7b745ca0ac..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/rest.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" -require "google/cloud/web_security_scanner/v1beta/version" - -module Google - module Cloud - module WebSecurityScanner - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/web_security_scanner/v1beta/rest" - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - module V1beta - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/version.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/version.rb deleted file mode 100644 index f0209dccfca1..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/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 WebSecurityScanner - module V1beta - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.rb deleted file mode 100644 index e4d014ad6c61..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner.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/web_security_scanner/v1beta/version" - -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/paths" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/client" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" - -module Google - module Cloud - module WebSecurityScanner - module V1beta - ## - # Cloud Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud Platform. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/web_security_scanner/v1beta/web_security_scanner" - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - module WebSecurityScanner - end - end - end - end -end - -helper_path = ::File.join __dir__, "web_security_scanner", "helpers.rb" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb deleted file mode 100644 index 05285d2d540c..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/client.rb +++ /dev/null @@ -1,1721 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/websecurityscanner/v1beta/web_security_scanner_pb" - -module Google - module Cloud - module WebSecurityScanner - module V1beta - module WebSecurityScanner - ## - # Client for the WebSecurityScanner service. - # - # Cloud Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud Platform. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "websecurityscanner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :web_security_scanner_stub - - ## - # Configure the WebSecurityScanner Client class. - # - # See {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WebSecurityScanner clients - # ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "WebSecurityScanner", "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_scan_config.timeout = 600.0 - - default_config.rpcs.delete_scan_config.timeout = 600.0 - default_config.rpcs.delete_scan_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_scan_config.timeout = 600.0 - default_config.rpcs.get_scan_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_scan_configs.timeout = 600.0 - default_config.rpcs.list_scan_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_scan_config.timeout = 600.0 - - default_config.rpcs.start_scan_run.timeout = 600.0 - - default_config.rpcs.get_scan_run.timeout = 600.0 - default_config.rpcs.get_scan_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_scan_runs.timeout = 600.0 - default_config.rpcs.list_scan_runs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.stop_scan_run.timeout = 600.0 - - default_config.rpcs.list_crawled_urls.timeout = 600.0 - default_config.rpcs.list_crawled_urls.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_finding.timeout = 600.0 - default_config.rpcs.get_finding.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 600.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_finding_type_stats.timeout = 600.0 - default_config.rpcs.list_finding_type_stats.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 WebSecurityScanner Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @web_security_scanner_stub.universe_domain - end - - ## - # Create a new WebSecurityScanner client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WebSecurityScanner 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/websecurityscanner/v1beta/web_security_scanner_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 - - @web_security_scanner_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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 - ) - - @web_security_scanner_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 - @web_security_scanner_stub.logger - end - - # Service calls - - ## - # Creates a new ScanConfig. - # - # @overload create_scan_config(request, options = nil) - # Pass arguments to `create_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_scan_config(parent: nil, scan_config: nil) - # Pass arguments to `create_scan_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name where the scan is created, which should be a - # project resource name in the format 'projects/\\{projectId}'. - # @param scan_config [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash] - # Required. The ScanConfig to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new - # - # # Call the create_scan_config method. - # result = client.create_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. - # p result - # - def create_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_scan_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::WebSecurityScanner::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_scan_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :create_scan_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing ScanConfig and its child resources. - # - # @overload delete_scan_config(request, options = nil) - # Pass arguments to `delete_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_scan_config(name: nil) - # Pass arguments to `delete_scan_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 resource name of the ScanConfig to be deleted. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Protobuf::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/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new - # - # # Call the delete_scan_config method. - # result = client.delete_scan_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_scan_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::WebSecurityScanner::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_scan_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :delete_scan_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ScanConfig. - # - # @overload get_scan_config(request, options = nil) - # Pass arguments to `get_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_scan_config(name: nil) - # Pass arguments to `get_scan_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 resource name of the ScanConfig to be returned. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new - # - # # Call the get_scan_config method. - # result = client.get_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. - # p result - # - def get_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_scan_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::WebSecurityScanner::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_scan_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :get_scan_config, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ScanConfigs under a given project. - # - # @overload list_scan_configs(request, options = nil) - # Pass arguments to `list_scan_configs` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_scan_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_scan_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, which should be a project resource name in the - # format 'projects/\\{projectId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of ScanConfigs to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new - # - # # Call the list_scan_configs method. - # result = client.list_scan_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::WebSecurityScanner::V1beta::ScanConfig. - # p item - # end - # - def list_scan_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_scan_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::WebSecurityScanner::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_scan_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scan_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_scan_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a ScanConfig. This method support partial update of a ScanConfig. - # - # @overload update_scan_config(request, options = nil) - # Pass arguments to `update_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_scan_config(scan_config: nil, update_mask: nil) - # Pass arguments to `update_scan_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 scan_config [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash] - # Required. The ScanConfig to be updated. The name field must be set to identify the - # resource to be updated. The values of fields not covered by the mask - # will be ignored. - # @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::WebSecurityScanner::V1beta::ScanConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new - # - # # Call the update_scan_config method. - # result = client.update_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. - # p result - # - def update_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_scan_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::WebSecurityScanner::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.scan_config&.name - header_params["scan_config.name"] = request.scan_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_scan_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :update_scan_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 - - ## - # Start a ScanRun according to the given ScanConfig. - # - # @overload start_scan_run(request, options = nil) - # Pass arguments to `start_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scan_run(name: nil) - # Pass arguments to `start_scan_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 resource name of the ScanConfig to be used. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new - # - # # Call the start_scan_run method. - # result = client.start_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. - # p result - # - def start_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest - - # Converts hash and nil to 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_scan_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::WebSecurityScanner::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.start_scan_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :start_scan_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 - - ## - # Gets a ScanRun. - # - # @overload get_scan_run(request, options = nil) - # Pass arguments to `get_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_scan_run(name: nil) - # Pass arguments to `get_scan_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 resource name of the ScanRun to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new - # - # # Call the get_scan_run method. - # result = client.get_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. - # p result - # - def get_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_scan_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::WebSecurityScanner::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_scan_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :get_scan_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 - - ## - # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun - # stop time. - # - # @overload list_scan_runs(request, options = nil) - # Pass arguments to `list_scan_runs` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_scan_runs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_scan_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. The parent resource name, which should be a scan resource name in the - # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of ScanRuns to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new - # - # # Call the list_scan_runs method. - # result = client.list_scan_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::WebSecurityScanner::V1beta::ScanRun. - # p item - # end - # - def list_scan_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_scan_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::WebSecurityScanner::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_scan_runs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_scan_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_scan_runs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_scan_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 - - ## - # Stops a ScanRun. The stopped ScanRun is returned. - # - # @overload stop_scan_run(request, options = nil) - # Pass arguments to `stop_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scan_run(name: nil) - # Pass arguments to `stop_scan_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 resource name of the ScanRun to be stopped. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new - # - # # Call the stop_scan_run method. - # result = client.stop_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. - # p result - # - def stop_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest - - # Converts hash and nil to 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_scan_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::WebSecurityScanner::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.stop_scan_run.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stop_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :stop_scan_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 - - ## - # List CrawledUrls under a given ScanRun. - # - # @overload list_crawled_urls(request, options = nil) - # Pass arguments to `list_crawled_urls` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_crawled_urls(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_crawled_urls` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of CrawledUrls to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new - # - # # Call the list_crawled_urls method. - # result = client.list_crawled_urls request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl. - # p item - # end - # - def list_crawled_urls request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_crawled_urls.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::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_crawled_urls.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_crawled_urls.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_crawled_urls, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, request, response, 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 Finding. - # - # @overload get_finding(request, options = nil) - # Pass arguments to `get_finding` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_finding(name: nil) - # Pass arguments to `get_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Finding to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::Finding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::Finding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new - # - # # Call the get_finding method. - # result = client.get_finding request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::Finding. - # p result - # - def get_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::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_finding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :get_finding, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List Findings under a given ScanRun. - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @param filter [::String] - # Required. The filter expression. The expression must be in the format: - # . - # Supported field: 'finding_type'. - # Supported operator: '='. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of Findings to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::Finding. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::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_findings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_findings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @web_security_scanner_stub, :list_findings, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List all FindingTypeStats under a given ScanRun. - # - # @overload list_finding_type_stats(request, options = nil) - # Pass arguments to `list_finding_type_stats` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_finding_type_stats(parent: nil) - # Pass arguments to `list_finding_type_stats` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new - # - # # Call the list_finding_type_stats method. - # result = client.list_finding_type_stats request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse. - # p result - # - def list_finding_type_stats request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_finding_type_stats.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::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_finding_type_stats.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_finding_type_stats.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.call_rpc :list_finding_type_stats, request, 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 WebSecurityScanner API. - # - # This class represents the configuration for WebSecurityScanner, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_scan_config to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_scan_config.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_scan_config.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "websecurityscanner.googleapis.com" - - config_attr :endpoint, nil, ::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 WebSecurityScanner API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scan_config - ## - # RPC-specific configuration for `delete_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scan_config - ## - # RPC-specific configuration for `get_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scan_config - ## - # RPC-specific configuration for `list_scan_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scan_configs - ## - # RPC-specific configuration for `update_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scan_config - ## - # RPC-specific configuration for `start_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :start_scan_run - ## - # RPC-specific configuration for `get_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scan_run - ## - # RPC-specific configuration for `list_scan_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scan_runs - ## - # RPC-specific configuration for `stop_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_scan_run - ## - # RPC-specific configuration for `list_crawled_urls` - # @return [::Gapic::Config::Method] - # - attr_reader :list_crawled_urls - ## - # RPC-specific configuration for `get_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_finding - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_finding_type_stats` - # @return [::Gapic::Config::Method] - # - attr_reader :list_finding_type_stats - - # @private - def initialize parent_rpcs = nil - create_scan_config_config = parent_rpcs.create_scan_config if parent_rpcs.respond_to? :create_scan_config - @create_scan_config = ::Gapic::Config::Method.new create_scan_config_config - delete_scan_config_config = parent_rpcs.delete_scan_config if parent_rpcs.respond_to? :delete_scan_config - @delete_scan_config = ::Gapic::Config::Method.new delete_scan_config_config - get_scan_config_config = parent_rpcs.get_scan_config if parent_rpcs.respond_to? :get_scan_config - @get_scan_config = ::Gapic::Config::Method.new get_scan_config_config - list_scan_configs_config = parent_rpcs.list_scan_configs if parent_rpcs.respond_to? :list_scan_configs - @list_scan_configs = ::Gapic::Config::Method.new list_scan_configs_config - update_scan_config_config = parent_rpcs.update_scan_config if parent_rpcs.respond_to? :update_scan_config - @update_scan_config = ::Gapic::Config::Method.new update_scan_config_config - start_scan_run_config = parent_rpcs.start_scan_run if parent_rpcs.respond_to? :start_scan_run - @start_scan_run = ::Gapic::Config::Method.new start_scan_run_config - get_scan_run_config = parent_rpcs.get_scan_run if parent_rpcs.respond_to? :get_scan_run - @get_scan_run = ::Gapic::Config::Method.new get_scan_run_config - list_scan_runs_config = parent_rpcs.list_scan_runs if parent_rpcs.respond_to? :list_scan_runs - @list_scan_runs = ::Gapic::Config::Method.new list_scan_runs_config - stop_scan_run_config = parent_rpcs.stop_scan_run if parent_rpcs.respond_to? :stop_scan_run - @stop_scan_run = ::Gapic::Config::Method.new stop_scan_run_config - list_crawled_urls_config = parent_rpcs.list_crawled_urls if parent_rpcs.respond_to? :list_crawled_urls - @list_crawled_urls = ::Gapic::Config::Method.new list_crawled_urls_config - get_finding_config = parent_rpcs.get_finding if parent_rpcs.respond_to? :get_finding - @get_finding = ::Gapic::Config::Method.new get_finding_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_finding_type_stats_config = parent_rpcs.list_finding_type_stats if parent_rpcs.respond_to? :list_finding_type_stats - @list_finding_type_stats = ::Gapic::Config::Method.new list_finding_type_stats_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials.rb deleted file mode 100644 index 9237239dac26..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/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 WebSecurityScanner - module V1beta - module WebSecurityScanner - # Credentials for the WebSecurityScanner API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "WEB_SECURITY_SCANNER_CREDENTIALS", - "WEB_SECURITY_SCANNER_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "WEB_SECURITY_SCANNER_CREDENTIALS_JSON", - "WEB_SECURITY_SCANNER_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-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb deleted file mode 100644 index 035cb9ea1502..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/paths.rb +++ /dev/null @@ -1,104 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1beta - module WebSecurityScanner - # Path helper methods for the WebSecurityScanner API. - module Paths - ## - # Create a fully-qualified Finding resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}` - # - # @param project [String] - # @param scan_config [String] - # @param scan_run [String] - # @param finding [String] - # - # @return [::String] - def finding_path project:, scan_config:, scan_run:, finding: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "scan_config cannot contain /" if scan_config.to_s.include? "/" - raise ::ArgumentError, "scan_run cannot contain /" if scan_run.to_s.include? "/" - - "projects/#{project}/scanConfigs/#{scan_config}/scanRuns/#{scan_run}/findings/#{finding}" - 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 ScanConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/scanConfigs/{scan_config}` - # - # @param project [String] - # @param scan_config [String] - # - # @return [::String] - def scan_config_path project:, scan_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/scanConfigs/#{scan_config}" - end - - ## - # Create a fully-qualified ScanRun resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}` - # - # @param project [String] - # @param scan_config [String] - # @param scan_run [String] - # - # @return [::String] - def scan_run_path project:, scan_config:, scan_run: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "scan_config cannot contain /" if scan_config.to_s.include? "/" - - "projects/#{project}/scanConfigs/#{scan_config}/scanRuns/#{scan_run}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest.rb deleted file mode 100644 index cc7e1c7d1fdd..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/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/web_security_scanner/v1beta/version" - -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/credentials" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/paths" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client" - -module Google - module Cloud - module WebSecurityScanner - module V1beta - ## - # Cloud Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud Platform. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - module WebSecurityScanner - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb deleted file mode 100644 index ffa4a9d484b1..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/client.rb +++ /dev/null @@ -1,1587 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/websecurityscanner/v1beta/web_security_scanner_pb" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub" - -module Google - module Cloud - module WebSecurityScanner - module V1beta - module WebSecurityScanner - module Rest - ## - # REST client for the WebSecurityScanner service. - # - # Cloud Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud Platform. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "websecurityscanner.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :web_security_scanner_stub - - ## - # Configure the WebSecurityScanner Client class. - # - # See {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all WebSecurityScanner clients - # ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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", "WebSecurityScanner", "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_scan_config.timeout = 600.0 - - default_config.rpcs.delete_scan_config.timeout = 600.0 - default_config.rpcs.delete_scan_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_scan_config.timeout = 600.0 - default_config.rpcs.get_scan_config.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_scan_configs.timeout = 600.0 - default_config.rpcs.list_scan_configs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.update_scan_config.timeout = 600.0 - - default_config.rpcs.start_scan_run.timeout = 600.0 - - default_config.rpcs.get_scan_run.timeout = 600.0 - default_config.rpcs.get_scan_run.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_scan_runs.timeout = 600.0 - default_config.rpcs.list_scan_runs.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.stop_scan_run.timeout = 600.0 - - default_config.rpcs.list_crawled_urls.timeout = 600.0 - default_config.rpcs.list_crawled_urls.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.get_finding.timeout = 600.0 - default_config.rpcs.get_finding.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_findings.timeout = 600.0 - default_config.rpcs.list_findings.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [4, 14] - } - - default_config.rpcs.list_finding_type_stats.timeout = 600.0 - default_config.rpcs.list_finding_type_stats.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 WebSecurityScanner Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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 - @web_security_scanner_stub.universe_domain - end - - ## - # Create a new WebSecurityScanner REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the WebSecurityScanner 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 - - @web_security_scanner_stub = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @web_security_scanner_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 - @web_security_scanner_stub.logger - end - - # Service calls - - ## - # Creates a new ScanConfig. - # - # @overload create_scan_config(request, options = nil) - # Pass arguments to `create_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_scan_config(parent: nil, scan_config: nil) - # Pass arguments to `create_scan_config` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name where the scan is created, which should be a - # project resource name in the format 'projects/\\{projectId}'. - # @param scan_config [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash] - # Required. The ScanConfig to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new - # - # # Call the create_scan_config method. - # result = client.create_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. - # p result - # - def create_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest - - # Converts hash and nil to an 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_scan_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::WebSecurityScanner::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_scan_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.create_scan_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes an existing ScanConfig and its child resources. - # - # @overload delete_scan_config(request, options = nil) - # Pass arguments to `delete_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_scan_config(name: nil) - # Pass arguments to `delete_scan_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 resource name of the ScanConfig to be deleted. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @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/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new - # - # # Call the delete_scan_config method. - # result = client.delete_scan_config request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_scan_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::WebSecurityScanner::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_scan_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.delete_scan_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets a ScanConfig. - # - # @overload get_scan_config(request, options = nil) - # Pass arguments to `get_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_scan_config(name: nil) - # Pass arguments to `get_scan_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 resource name of the ScanConfig to be returned. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new - # - # # Call the get_scan_config method. - # result = client.get_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. - # p result - # - def get_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_scan_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::WebSecurityScanner::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_scan_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.get_scan_config request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Lists ScanConfigs under a given project. - # - # @overload list_scan_configs(request, options = nil) - # Pass arguments to `list_scan_configs` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_scan_configs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_scan_configs` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, which should be a project resource name in the - # format 'projects/\\{projectId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of ScanConfigs to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new - # - # # Call the list_scan_configs method. - # result = client.list_scan_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::WebSecurityScanner::V1beta::ScanConfig. - # p item - # end - # - def list_scan_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_scan_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::WebSecurityScanner::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_scan_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scan_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_scan_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_configs, "scan_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates a ScanConfig. This method support partial update of a ScanConfig. - # - # @overload update_scan_config(request, options = nil) - # Pass arguments to `update_scan_config` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_scan_config(scan_config: nil, update_mask: nil) - # Pass arguments to `update_scan_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 scan_config [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig, ::Hash] - # Required. The ScanConfig to be updated. The name field must be set to identify the - # resource to be updated. The values of fields not covered by the mask - # will be ignored. - # @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::WebSecurityScanner::V1beta::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new - # - # # Call the update_scan_config method. - # result = client.update_scan_config request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. - # p result - # - def update_scan_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_scan_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::WebSecurityScanner::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_scan_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_scan_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.update_scan_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 - - ## - # Start a ScanRun according to the given ScanConfig. - # - # @overload start_scan_run(request, options = nil) - # Pass arguments to `start_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scan_run(name: nil) - # Pass arguments to `start_scan_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 resource name of the ScanConfig to be used. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new - # - # # Call the start_scan_run method. - # result = client.start_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. - # p result - # - def start_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest - - # Converts hash and nil to an 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_scan_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::WebSecurityScanner::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.start_scan_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.start_scan_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 - - ## - # Gets a ScanRun. - # - # @overload get_scan_run(request, options = nil) - # Pass arguments to `get_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_scan_run(name: nil) - # Pass arguments to `get_scan_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 resource name of the ScanRun to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new - # - # # Call the get_scan_run method. - # result = client.get_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. - # p result - # - def get_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_scan_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::WebSecurityScanner::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_scan_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.get_scan_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 - - ## - # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun - # stop time. - # - # @overload list_scan_runs(request, options = nil) - # Pass arguments to `list_scan_runs` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_scan_runs(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_scan_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. The parent resource name, which should be a scan resource name in the - # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of ScanRuns to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new - # - # # Call the list_scan_runs method. - # result = client.list_scan_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::WebSecurityScanner::V1beta::ScanRun. - # p item - # end - # - def list_scan_runs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_scan_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::WebSecurityScanner::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_scan_runs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_scan_runs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_scan_runs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_scan_runs, "scan_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 - - ## - # Stops a ScanRun. The stopped ScanRun is returned. - # - # @overload stop_scan_run(request, options = nil) - # Pass arguments to `stop_scan_run` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_scan_run(name: nil) - # Pass arguments to `stop_scan_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 resource name of the ScanRun to be stopped. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new - # - # # Call the stop_scan_run method. - # result = client.stop_scan_run request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. - # p result - # - def stop_scan_run request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest - - # Converts hash and nil to an 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_scan_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::WebSecurityScanner::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.stop_scan_run.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.stop_scan_run.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.stop_scan_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 - - ## - # List CrawledUrls under a given ScanRun. - # - # @overload list_crawled_urls(request, options = nil) - # Pass arguments to `list_crawled_urls` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_crawled_urls(parent: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_crawled_urls` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of CrawledUrls to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new - # - # # Call the list_crawled_urls method. - # result = client.list_crawled_urls request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl. - # p item - # end - # - def list_crawled_urls request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_crawled_urls.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::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_crawled_urls.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_crawled_urls.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_crawled_urls request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_crawled_urls, "crawled_urls", request, result, 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 Finding. - # - # @overload get_finding(request, options = nil) - # Pass arguments to `get_finding` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_finding(name: nil) - # Pass arguments to `get_finding` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Finding to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::Finding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new - # - # # Call the get_finding method. - # result = client.get_finding request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::Finding. - # p result - # - def get_finding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_finding.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::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_finding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_finding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.get_finding request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List Findings under a given ScanRun. - # - # @overload list_findings(request, options = nil) - # Pass arguments to `list_findings` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_findings(parent: nil, filter: nil, page_token: nil, page_size: nil) - # Pass arguments to `list_findings` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @param filter [::String] - # Required. The filter expression. The expression must be in the format: - # . - # Supported field: 'finding_type'. - # Supported operator: '='. - # @param page_token [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @param page_size [::Integer] - # The maximum number of Findings to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new - # - # # Call the list_findings method. - # result = client.list_findings request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::Finding. - # p item - # end - # - def list_findings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_findings.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::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_findings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_findings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_findings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @web_security_scanner_stub, :list_findings, "findings", request, result, 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 FindingTypeStats under a given ScanRun. - # - # @overload list_finding_type_stats(request, options = nil) - # Pass arguments to `list_finding_type_stats` via a request object, either of type - # {::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_finding_type_stats(parent: nil) - # Pass arguments to `list_finding_type_stats` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, 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, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/web_security_scanner/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new - # - # # Call the list_finding_type_stats method. - # result = client.list_finding_type_stats request - # - # # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse. - # p result - # - def list_finding_type_stats request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_finding_type_stats.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::WebSecurityScanner::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_finding_type_stats.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_finding_type_stats.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @web_security_scanner_stub.list_finding_type_stats request, 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 WebSecurityScanner REST API. - # - # This class represents the configuration for WebSecurityScanner 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::WebSecurityScanner::V1beta::WebSecurityScanner::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_scan_config to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_scan_config.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_scan_config.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "websecurityscanner.googleapis.com" - - config_attr :endpoint, nil, ::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 WebSecurityScanner API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `create_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_scan_config - ## - # RPC-specific configuration for `delete_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_scan_config - ## - # RPC-specific configuration for `get_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scan_config - ## - # RPC-specific configuration for `list_scan_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scan_configs - ## - # RPC-specific configuration for `update_scan_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_scan_config - ## - # RPC-specific configuration for `start_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :start_scan_run - ## - # RPC-specific configuration for `get_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :get_scan_run - ## - # RPC-specific configuration for `list_scan_runs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_scan_runs - ## - # RPC-specific configuration for `stop_scan_run` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_scan_run - ## - # RPC-specific configuration for `list_crawled_urls` - # @return [::Gapic::Config::Method] - # - attr_reader :list_crawled_urls - ## - # RPC-specific configuration for `get_finding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_finding - ## - # RPC-specific configuration for `list_findings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_findings - ## - # RPC-specific configuration for `list_finding_type_stats` - # @return [::Gapic::Config::Method] - # - attr_reader :list_finding_type_stats - - # @private - def initialize parent_rpcs = nil - create_scan_config_config = parent_rpcs.create_scan_config if parent_rpcs.respond_to? :create_scan_config - @create_scan_config = ::Gapic::Config::Method.new create_scan_config_config - delete_scan_config_config = parent_rpcs.delete_scan_config if parent_rpcs.respond_to? :delete_scan_config - @delete_scan_config = ::Gapic::Config::Method.new delete_scan_config_config - get_scan_config_config = parent_rpcs.get_scan_config if parent_rpcs.respond_to? :get_scan_config - @get_scan_config = ::Gapic::Config::Method.new get_scan_config_config - list_scan_configs_config = parent_rpcs.list_scan_configs if parent_rpcs.respond_to? :list_scan_configs - @list_scan_configs = ::Gapic::Config::Method.new list_scan_configs_config - update_scan_config_config = parent_rpcs.update_scan_config if parent_rpcs.respond_to? :update_scan_config - @update_scan_config = ::Gapic::Config::Method.new update_scan_config_config - start_scan_run_config = parent_rpcs.start_scan_run if parent_rpcs.respond_to? :start_scan_run - @start_scan_run = ::Gapic::Config::Method.new start_scan_run_config - get_scan_run_config = parent_rpcs.get_scan_run if parent_rpcs.respond_to? :get_scan_run - @get_scan_run = ::Gapic::Config::Method.new get_scan_run_config - list_scan_runs_config = parent_rpcs.list_scan_runs if parent_rpcs.respond_to? :list_scan_runs - @list_scan_runs = ::Gapic::Config::Method.new list_scan_runs_config - stop_scan_run_config = parent_rpcs.stop_scan_run if parent_rpcs.respond_to? :stop_scan_run - @stop_scan_run = ::Gapic::Config::Method.new stop_scan_run_config - list_crawled_urls_config = parent_rpcs.list_crawled_urls if parent_rpcs.respond_to? :list_crawled_urls - @list_crawled_urls = ::Gapic::Config::Method.new list_crawled_urls_config - get_finding_config = parent_rpcs.get_finding if parent_rpcs.respond_to? :get_finding - @get_finding = ::Gapic::Config::Method.new get_finding_config - list_findings_config = parent_rpcs.list_findings if parent_rpcs.respond_to? :list_findings - @list_findings = ::Gapic::Config::Method.new list_findings_config - list_finding_type_stats_config = parent_rpcs.list_finding_type_stats if parent_rpcs.respond_to? :list_finding_type_stats - @list_finding_type_stats = ::Gapic::Config::Method.new list_finding_type_stats_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb deleted file mode 100644 index bcd26bf90ea5..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/web_security_scanner/v1beta/web_security_scanner/rest/service_stub.rb +++ /dev/null @@ -1,878 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/websecurityscanner/v1beta/web_security_scanner_pb" - -module Google - module Cloud - module WebSecurityScanner - module V1beta - module WebSecurityScanner - module Rest - ## - # REST service stub for the WebSecurityScanner 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_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # A result object deserialized from the server's reply - def create_scan_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_scan_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_scan_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_scan_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_scan_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_scan_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_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # A result object deserialized from the server's reply - def get_scan_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_scan_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_scan_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_scan_configs REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse] - # A result object deserialized from the server's reply - def list_scan_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scan_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_scan_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # A result object deserialized from the server's reply - def update_scan_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_scan_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_scan_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.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_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # A result object deserialized from the server's reply - def start_scan_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_scan_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: "start_scan_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # A result object deserialized from the server's reply - def get_scan_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_scan_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_scan_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_scan_runs REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse] - # A result object deserialized from the server's reply - def list_scan_runs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_scan_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_scan_runs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse.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_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # A result object deserialized from the server's reply - def stop_scan_run request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_stop_scan_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: "stop_scan_run", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_crawled_urls REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse] - # A result object deserialized from the server's reply - def list_crawled_urls request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_crawled_urls_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_crawled_urls", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_finding REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::Finding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::Finding] - # A result object deserialized from the server's reply - def get_finding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_finding_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_finding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::Finding.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_findings REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse] - # A result object deserialized from the server's reply - def list_findings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_findings_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_findings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_finding_type_stats REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse] - # A result object deserialized from the server's reply - def list_finding_type_stats request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_finding_type_stats_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_finding_type_stats", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse.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_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest] - # 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_scan_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/scanConfigs", - body: "scan_config", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_scan_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_scan_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scan_configs REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_scan_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/scanConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_scan_config REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_scan_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{scan_config.name}", - body: "scan_config", - matches: [ - ["scan_config.name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest] - # 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_scan_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_scan_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_scan_runs REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_scan_runs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/scanRuns", - matches: [ - ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the stop_scan_run REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest] - # 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_scan_run_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:stop", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_crawled_urls REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_crawled_urls_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/crawledUrls", - matches: [ - ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_finding REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_finding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/findings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_findings REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_findings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/findings", - matches: [ - ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_finding_type_stats REST call - # - # @param request_pb [::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_finding_type_stats_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/findingTypeStats", - matches: [ - ["parent", %r{^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb deleted file mode 100644 index 449ef3c1bef6..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/crawled_url_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/crawled_url.proto - -require 'google/protobuf' - - -descriptor_data = "\n8google/cloud/websecurityscanner/v1beta/crawled_url.proto\x12&google.cloud.websecurityscanner.v1beta\"<\n\nCrawledUrl\x12\x13\n\x0bhttp_method\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12\x0c\n\x04\x62ody\x18\x03 \x01(\tB\x99\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0f\x43rawledUrlProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - CrawledUrl = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.CrawledUrl").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb deleted file mode 100644 index 37bf5666a7f2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_addon_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/finding_addon.proto - -require 'google/protobuf' - - -descriptor_data = "\n:google/cloud/websecurityscanner/v1beta/finding_addon.proto\x12&google.cloud.websecurityscanner.v1beta\"*\n\x04\x46orm\x12\x12\n\naction_uri\x18\x01 \x01(\t\x12\x0e\n\x06\x66ields\x18\x02 \x03(\t\"Q\n\x0fOutdatedLibrary\x12\x14\n\x0clibrary_name\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x17\n\x0flearn_more_urls\x18\x03 \x03(\t\"?\n\x11ViolatingResource\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x14\n\x0cresource_url\x18\x02 \x01(\t\"/\n\x14VulnerableParameters\x12\x17\n\x0fparameter_names\x18\x01 \x03(\t\"\xe8\x01\n\x11VulnerableHeaders\x12Q\n\x07headers\x18\x01 \x03(\x0b\x32@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header\x12Y\n\x0fmissing_headers\x18\x02 \x03(\x0b\x32@.google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header\x1a%\n\x06Header\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"2\n\x03Xss\x12\x14\n\x0cstack_traces\x18\x01 \x03(\t\x12\x15\n\rerror_message\x18\x02 \x01(\tB\x9b\x02\n*com.google.cloud.websecurityscanner.v1betaB\x11\x46indingAddonProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - Form = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.Form").msgclass - OutdatedLibrary = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.OutdatedLibrary").msgclass - ViolatingResource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ViolatingResource").msgclass - VulnerableParameters = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.VulnerableParameters").msgclass - VulnerableHeaders = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.VulnerableHeaders").msgclass - VulnerableHeaders::Header = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.VulnerableHeaders.Header").msgclass - Xss = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.Xss").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb deleted file mode 100644 index deb1933acd4d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/finding.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/websecurityscanner/v1beta/finding_addon_pb' - - -descriptor_data = "\n4google/cloud/websecurityscanner/v1beta/finding.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x19google/api/resource.proto\x1a:google/cloud/websecurityscanner/v1beta/finding_addon.proto\"\xa9\x06\n\x07\x46inding\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x66inding_type\x18\x02 \x01(\t\x12\x13\n\x0bhttp_method\x18\x03 \x01(\t\x12\x12\n\nfuzzed_url\x18\x04 \x01(\t\x12\x0c\n\x04\x62ody\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x18\n\x10reproduction_url\x18\x07 \x01(\t\x12\x11\n\tframe_url\x18\x08 \x01(\t\x12\x11\n\tfinal_url\x18\t \x01(\t\x12\x13\n\x0btracking_id\x18\n \x01(\t\x12:\n\x04\x66orm\x18\x10 \x01(\x0b\x32,.google.cloud.websecurityscanner.v1beta.Form\x12Q\n\x10outdated_library\x18\x0b \x01(\x0b\x32\x37.google.cloud.websecurityscanner.v1beta.OutdatedLibrary\x12U\n\x12violating_resource\x18\x0c \x01(\x0b\x32\x39.google.cloud.websecurityscanner.v1beta.ViolatingResource\x12U\n\x12vulnerable_headers\x18\x0f \x01(\x0b\x32\x39.google.cloud.websecurityscanner.v1beta.VulnerableHeaders\x12[\n\x15vulnerable_parameters\x18\r \x01(\x0b\x32<.google.cloud.websecurityscanner.v1beta.VulnerableParameters\x12\x38\n\x03xss\x18\x0e \x01(\x0b\x32+.google.cloud.websecurityscanner.v1beta.Xss:\x84\x01\xea\x41\x80\x01\n)websecurityscanner.googleapis.com/Finding\x12Sprojects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}/findings/{finding}B\x96\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0c\x46indingProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.websecurityscanner.v1beta.Form", "google/cloud/websecurityscanner/v1beta/finding_addon.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - Finding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.Finding").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb deleted file mode 100644 index 7e7c45ccae03..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/finding_type_stats_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/finding_type_stats.proto - -require 'google/protobuf' - - -descriptor_data = "\n?google/cloud/websecurityscanner/v1beta/finding_type_stats.proto\x12&google.cloud.websecurityscanner.v1beta\"?\n\x10\x46indingTypeStats\x12\x14\n\x0c\x66inding_type\x18\x01 \x01(\t\x12\x15\n\rfinding_count\x18\x02 \x01(\x05\x42\x9f\x02\n*com.google.cloud.websecurityscanner.v1betaB\x15\x46indingTypeStatsProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - FindingTypeStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.FindingTypeStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb deleted file mode 100644 index d02399ae0eac..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_error_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/scan_config_error.proto - -require 'google/protobuf' - - -descriptor_data = "\n>google/cloud/websecurityscanner/v1beta/scan_config_error.proto\x12&google.cloud.websecurityscanner.v1beta\"\xed\x0b\n\x0fScanConfigError\x12J\n\x04\x63ode\x18\x01 \x01(\x0e\x32<.google.cloud.websecurityscanner.v1beta.ScanConfigError.Code\x12\x12\n\nfield_name\x18\x02 \x01(\t\"\xf9\n\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x06\n\x02OK\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x1f\n\x1b\x41PPENGINE_API_BACKEND_ERROR\x10\x02\x12 \n\x1c\x41PPENGINE_API_NOT_ACCESSIBLE\x10\x03\x12\"\n\x1e\x41PPENGINE_DEFAULT_HOST_MISSING\x10\x04\x12!\n\x1d\x43\x41NNOT_USE_GOOGLE_COM_ACCOUNT\x10\x06\x12\x1c\n\x18\x43\x41NNOT_USE_OWNER_ACCOUNT\x10\x07\x12\x1d\n\x19\x43OMPUTE_API_BACKEND_ERROR\x10\x08\x12\x1e\n\x1a\x43OMPUTE_API_NOT_ACCESSIBLE\x10\t\x12\x37\n3CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\n\x12\x1e\n\x1a\x43USTOM_LOGIN_URL_MALFORMED\x10\x0b\x12\x33\n/CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x0c\x12\x31\n-CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10\r\x12\x30\n,CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10\x0e\x12.\n*CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS\x10\x0f\x12\x17\n\x13\x44UPLICATE_SCAN_NAME\x10\x10\x12\x17\n\x13INVALID_FIELD_VALUE\x10\x12\x12$\n FAILED_TO_AUTHENTICATE_TO_TARGET\x10\x13\x12\x1c\n\x18\x46INDING_TYPE_UNSPECIFIED\x10\x14\x12\x1d\n\x19\x46ORBIDDEN_TO_SCAN_COMPUTE\x10\x15\x12$\n FORBIDDEN_UPDATE_TO_MANAGED_SCAN\x10+\x12\x14\n\x10MALFORMED_FILTER\x10\x16\x12\x1b\n\x17MALFORMED_RESOURCE_NAME\x10\x17\x12\x14\n\x10PROJECT_INACTIVE\x10\x18\x12\x12\n\x0eREQUIRED_FIELD\x10\x19\x12\x1e\n\x1aRESOURCE_NAME_INCONSISTENT\x10\x1a\x12\x18\n\x14SCAN_ALREADY_RUNNING\x10\x1b\x12\x14\n\x10SCAN_NOT_RUNNING\x10\x1c\x12/\n+SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT\x10\x1d\x12\x16\n\x12SEED_URL_MALFORMED\x10\x1e\x12+\n\'SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS\x10\x1f\x12)\n%SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS\x10 \x12(\n$SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS\x10!\x12&\n\"SEED_URL_HAS_UNRESERVED_IP_ADDRESS\x10#\x12\"\n\x1eSERVICE_ACCOUNT_NOT_CONFIGURED\x10$\x12\x12\n\x0eTOO_MANY_SCANS\x10%\x12\"\n\x1eUNABLE_TO_RESOLVE_PROJECT_INFO\x10&\x12(\n$UNSUPPORTED_BLACKLIST_PATTERN_FORMAT\x10\'\x12\x16\n\x12UNSUPPORTED_FILTER\x10(\x12\x1c\n\x18UNSUPPORTED_FINDING_TYPE\x10)\x12\x1a\n\x16UNSUPPORTED_URL_SCHEME\x10*\x1a\x02\x10\x01\x42\x9e\x02\n*com.google.cloud.websecurityscanner.v1betaB\x14ScanConfigErrorProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - ScanConfigError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfigError").msgclass - ScanConfigError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfigError.Code").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb deleted file mode 100644 index fd58a4054743..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_config_pb.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/scan_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/websecurityscanner/v1beta/scan_run_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n8google/cloud/websecurityscanner/v1beta/scan_config.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x35google/cloud/websecurityscanner/v1beta/scan_run.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\r\n\nScanConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x0f\n\x07max_qps\x18\x03 \x01(\x05\x12\x1a\n\rstarting_urls\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12Y\n\x0e\x61uthentication\x18\x05 \x01(\x0b\x32\x41.google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication\x12P\n\nuser_agent\x18\x06 \x01(\x0e\x32<.google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent\x12\x1a\n\x12\x62lacklist_patterns\x18\x07 \x03(\t\x12M\n\x08schedule\x18\x08 \x01(\x0b\x32;.google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule\x12[\n\x10target_platforms\x18\t \x03(\x0e\x32\x41.google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform\x12{\n!export_to_security_command_center\x18\n \x01(\x0e\x32P.google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter\x12\x43\n\nlatest_run\x18\x0b \x01(\x0b\x32/.google.cloud.websecurityscanner.v1beta.ScanRun\x12P\n\nrisk_level\x18\x0c \x01(\x0e\x32<.google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel\x1a\x94\x03\n\x0e\x41uthentication\x12i\n\x0egoogle_account\x18\x01 \x01(\x0b\x32O.google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccountH\x00\x12i\n\x0e\x63ustom_account\x18\x02 \x01(\x0b\x32O.google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccountH\x00\x1a@\n\rGoogleAccount\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08password\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x1aX\n\rCustomAccount\x12\x15\n\x08username\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x08password\x18\x02 \x01(\tB\x06\xe0\x41\x02\xe0\x41\x04\x12\x16\n\tlogin_url\x18\x03 \x01(\tB\x03\xe0\x41\x02\x42\x10\n\x0e\x61uthentication\x1a\x62\n\x08Schedule\x12\x31\n\rschedule_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12#\n\x16interval_duration_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"`\n\tUserAgent\x12\x1a\n\x16USER_AGENT_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43HROME_LINUX\x10\x01\x12\x12\n\x0e\x43HROME_ANDROID\x10\x02\x12\x11\n\rSAFARI_IPHONE\x10\x03\"N\n\x0eTargetPlatform\x12\x1f\n\x1bTARGET_PLATFORM_UNSPECIFIED\x10\x00\x12\x0e\n\nAPP_ENGINE\x10\x01\x12\x0b\n\x07\x43OMPUTE\x10\x02\"<\n\tRiskLevel\x12\x1a\n\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x07\n\x03LOW\x10\x02\"m\n\x1d\x45xportToSecurityCommandCenter\x12\x31\n-EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:_\xea\x41\\\n,websecurityscanner.googleapis.com/ScanConfig\x12,projects/{project}/scanConfigs/{scan_config}B\x99\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0fScanConfigProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.websecurityscanner.v1beta.ScanRun", "google/cloud/websecurityscanner/v1beta/scan_run.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - ScanConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig").msgclass - ScanConfig::Authentication = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication").msgclass - ScanConfig::Authentication::GoogleAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.GoogleAccount").msgclass - ScanConfig::Authentication::CustomAccount = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.Authentication.CustomAccount").msgclass - ScanConfig::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.Schedule").msgclass - ScanConfig::UserAgent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.UserAgent").enummodule - ScanConfig::TargetPlatform = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.TargetPlatform").enummodule - ScanConfig::RiskLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.RiskLevel").enummodule - ScanConfig::ExportToSecurityCommandCenter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanConfig.ExportToSecurityCommandCenter").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb deleted file mode 100644 index 9fce2a3dc313..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb.rb +++ /dev/null @@ -1,46 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto - -require 'google/protobuf' - -require 'google/cloud/websecurityscanner/v1beta/scan_config_error_pb' - - -descriptor_data = "\nAgoogle/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto\x12&google.cloud.websecurityscanner.v1beta\x1a>google/cloud/websecurityscanner/v1beta/scan_config_error.proto\"\x95\x03\n\x11ScanRunErrorTrace\x12L\n\x04\x63ode\x18\x01 \x01(\x0e\x32>.google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code\x12R\n\x11scan_config_error\x18\x02 \x01(\x0b\x32\x37.google.cloud.websecurityscanner.v1beta.ScanConfigError\x12#\n\x1bmost_common_http_error_code\x18\x03 \x01(\x05\"\xb8\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eINTERNAL_ERROR\x10\x01\x12\x15\n\x11SCAN_CONFIG_ISSUE\x10\x02\x12\x1f\n\x1b\x41UTHENTICATION_CONFIG_ISSUE\x10\x03\x12\x1c\n\x18TIMED_OUT_WHILE_SCANNING\x10\x04\x12\x16\n\x12TOO_MANY_REDIRECTS\x10\x05\x12\x18\n\x14TOO_MANY_HTTP_ERRORS\x10\x06\x42\xa0\x02\n*com.google.cloud.websecurityscanner.v1betaB\x16ScanRunErrorTraceProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.websecurityscanner.v1beta.ScanConfigError", "google/cloud/websecurityscanner/v1beta/scan_config_error.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - ScanRunErrorTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace").msgclass - ScanRunErrorTrace::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace.Code").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb deleted file mode 100644 index b4b0c361f10d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/scan_run.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/cloud/websecurityscanner/v1beta/scan_run_error_trace_pb' -require 'google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/websecurityscanner/v1beta/scan_run.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x19google/api/resource.proto\x1a\x41google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto\x1a\x43google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd2\x06\n\x07ScanRun\x12\x0c\n\x04name\x18\x01 \x01(\t\x12W\n\x0f\x65xecution_state\x18\x02 \x01(\x0e\x32>.google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState\x12Q\n\x0cresult_state\x18\x03 \x01(\x0e\x32;.google.cloud.websecurityscanner.v1beta.ScanRun.ResultState\x12.\n\nstart_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\x12urls_crawled_count\x18\x06 \x01(\x03\x12\x19\n\x11urls_tested_count\x18\x07 \x01(\x03\x12\x1b\n\x13has_vulnerabilities\x18\x08 \x01(\x08\x12\x18\n\x10progress_percent\x18\t \x01(\x05\x12N\n\x0b\x65rror_trace\x18\n \x01(\x0b\x32\x39.google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace\x12S\n\x0ewarning_traces\x18\x0b \x03(\x0b\x32;.google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace\"Y\n\x0e\x45xecutionState\x12\x1f\n\x1b\x45XECUTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06QUEUED\x10\x01\x12\x0c\n\x08SCANNING\x10\x02\x12\x0c\n\x08\x46INISHED\x10\x03\"O\n\x0bResultState\x12\x1c\n\x18RESULT_STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\t\n\x05\x45RROR\x10\x02\x12\n\n\x06KILLED\x10\x03:p\xea\x41m\n)websecurityscanner.googleapis.com/ScanRun\x12@projects/{project}/scanConfigs/{scan_config}/scanRuns/{scan_run}B\x96\x02\n*com.google.cloud.websecurityscanner.v1betaB\x0cScanRunProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.websecurityscanner.v1beta.ScanRunErrorTrace", "google/cloud/websecurityscanner/v1beta/scan_run_error_trace.proto"], - ["google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace", "google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - ScanRun = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRun").msgclass - ScanRun::ExecutionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRun.ExecutionState").enummodule - ScanRun::ResultState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRun.ResultState").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb deleted file mode 100644 index eeec56602bcb..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto - -require 'google/protobuf' - - -descriptor_data = "\nCgoogle/cloud/websecurityscanner/v1beta/scan_run_warning_trace.proto\x12&google.cloud.websecurityscanner.v1beta\"\xed\x01\n\x13ScanRunWarningTrace\x12N\n\x04\x63ode\x18\x01 \x01(\x0e\x32@.google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code\"\x85\x01\n\x04\x43ode\x12\x14\n\x10\x43ODE_UNSPECIFIED\x10\x00\x12\x1e\n\x1aINSUFFICIENT_CRAWL_RESULTS\x10\x01\x12\x1a\n\x16TOO_MANY_CRAWL_RESULTS\x10\x02\x12\x17\n\x13TOO_MANY_FUZZ_TASKS\x10\x03\x12\x12\n\x0e\x42LOCKED_BY_IAP\x10\x04\x42\xa2\x02\n*com.google.cloud.websecurityscanner.v1betaB\x18ScanRunWarningTraceProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - ScanRunWarningTrace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace").msgclass - ScanRunWarningTrace::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ScanRunWarningTrace.Code").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb deleted file mode 100644 index 63802e3fe6d9..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_pb.rb +++ /dev/null @@ -1,77 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/websecurityscanner/v1beta/web_security_scanner.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/websecurityscanner/v1beta/crawled_url_pb' -require 'google/cloud/websecurityscanner/v1beta/finding_pb' -require 'google/cloud/websecurityscanner/v1beta/finding_type_stats_pb' -require 'google/cloud/websecurityscanner/v1beta/scan_config_pb' -require 'google/cloud/websecurityscanner/v1beta/scan_run_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' - - -descriptor_data = "\nAgoogle/cloud/websecurityscanner/v1beta/web_security_scanner.proto\x12&google.cloud.websecurityscanner.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x38google/cloud/websecurityscanner/v1beta/crawled_url.proto\x1a\x34google/cloud/websecurityscanner/v1beta/finding.proto\x1a?google/cloud/websecurityscanner/v1beta/finding_type_stats.proto\x1a\x38google/cloud/websecurityscanner/v1beta/scan_config.proto\x1a\x35google/cloud/websecurityscanner/v1beta/scan_run.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xac\x01\n\x17\x43reateScanConfigRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12L\n\x0bscan_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.websecurityscanner.v1beta.ScanConfigB\x03\xe0\x41\x02\"]\n\x17\x44\x65leteScanConfigRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,websecurityscanner.googleapis.com/ScanConfig\"Z\n\x14GetScanConfigRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,websecurityscanner.googleapis.com/ScanConfig\"\x84\x01\n\x16ListScanConfigsRequest\x12\x43\n\x06parent\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"\x9d\x01\n\x17UpdateScanConfigRequest\x12L\n\x0bscan_config\x18\x02 \x01(\x0b\x32\x32.google.cloud.websecurityscanner.v1beta.ScanConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"|\n\x17ListScanConfigsResponse\x12H\n\x0cscan_configs\x18\x01 \x03(\x0b\x32\x32.google.cloud.websecurityscanner.v1beta.ScanConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"Y\n\x13StartScanRunRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,websecurityscanner.googleapis.com/ScanConfig\"T\n\x11GetScanRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\"\x82\x01\n\x13ListScanRunsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,websecurityscanner.googleapis.com/ScanConfig\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"s\n\x14ListScanRunsResponse\x12\x42\n\tscan_runs\x18\x01 \x03(\x0b\x32/.google.cloud.websecurityscanner.v1beta.ScanRun\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"U\n\x12StopScanRunRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\"\x82\x01\n\x16ListCrawledUrlsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\x12\x12\n\npage_token\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\"|\n\x17ListCrawledUrlsResponse\x12H\n\x0c\x63rawled_urls\x18\x01 \x03(\x0b\x32\x32.google.cloud.websecurityscanner.v1beta.CrawledUrl\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"T\n\x11GetFindingRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/Finding\"\x94\x01\n\x13ListFindingsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\x12\x13\n\x06\x66ilter\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x11\n\tpage_size\x18\x04 \x01(\x05\"r\n\x14ListFindingsResponse\x12\x41\n\x08\x66indings\x18\x01 \x03(\x0b\x32/.google.cloud.websecurityscanner.v1beta.Finding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"`\n\x1bListFindingTypeStatsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)websecurityscanner.googleapis.com/ScanRun\"t\n\x1cListFindingTypeStatsResponse\x12T\n\x12\x66inding_type_stats\x18\x01 \x03(\x0b\x32\x38.google.cloud.websecurityscanner.v1beta.FindingTypeStats2\x8e\x16\n\x12WebSecurityScanner\x12\xda\x01\n\x10\x43reateScanConfig\x12?.google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest\x1a\x32.google.cloud.websecurityscanner.v1beta.ScanConfig\"Q\xda\x41\x12parent,scan_config\x82\xd3\xe4\x93\x02\x36\"\'/v1beta/{parent=projects/*}/scanConfigs:\x0bscan_config\x12\xa3\x01\n\x10\x44\x65leteScanConfig\x12?.google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest\x1a\x16.google.protobuf.Empty\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)*\'/v1beta/{name=projects/*/scanConfigs/*}\x12\xb9\x01\n\rGetScanConfig\x12<.google.cloud.websecurityscanner.v1beta.GetScanConfigRequest\x1a\x32.google.cloud.websecurityscanner.v1beta.ScanConfig\"6\xda\x41\x04name\x82\xd3\xe4\x93\x02)\x12\'/v1beta/{name=projects/*/scanConfigs/*}\x12\xcc\x01\n\x0fListScanConfigs\x12>.google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest\x1a?.google.cloud.websecurityscanner.v1beta.ListScanConfigsResponse\"8\xda\x41\x06parent\x82\xd3\xe4\x93\x02)\x12\'/v1beta/{parent=projects/*}/scanConfigs\x12\xeb\x01\n\x10UpdateScanConfig\x12?.google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest\x1a\x32.google.cloud.websecurityscanner.v1beta.ScanConfig\"b\xda\x41\x17scan_config,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x33/v1beta/{scan_config.name=projects/*/scanConfigs/*}:\x0bscan_config\x12\xbd\x01\n\x0cStartScanRun\x12;.google.cloud.websecurityscanner.v1beta.StartScanRunRequest\x1a/.google.cloud.websecurityscanner.v1beta.ScanRun\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\"-/v1beta/{name=projects/*/scanConfigs/*}:start:\x01*\x12\xbb\x01\n\nGetScanRun\x12\x39.google.cloud.websecurityscanner.v1beta.GetScanRunRequest\x1a/.google.cloud.websecurityscanner.v1beta.ScanRun\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}\x12\xce\x01\n\x0cListScanRuns\x12;.google.cloud.websecurityscanner.v1beta.ListScanRunsRequest\x1a<.google.cloud.websecurityscanner.v1beta.ListScanRunsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1beta/{parent=projects/*/scanConfigs/*}/scanRuns\x12\xc5\x01\n\x0bStopScanRun\x12:.google.cloud.websecurityscanner.v1beta.StopScanRunRequest\x1a/.google.cloud.websecurityscanner.v1beta.ScanRun\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\"7/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*}:stop:\x01*\x12\xe5\x01\n\x0fListCrawledUrls\x12>.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest\x1a?.google.cloud.websecurityscanner.v1beta.ListCrawledUrlsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/crawledUrls\x12\xc6\x01\n\nGetFinding\x12\x39.google.cloud.websecurityscanner.v1beta.GetFindingRequest\x1a/.google.cloud.websecurityscanner.v1beta.Finding\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1beta/{name=projects/*/scanConfigs/*/scanRuns/*/findings/*}\x12\xe0\x01\n\x0cListFindings\x12;.google.cloud.websecurityscanner.v1beta.ListFindingsRequest\x1a<.google.cloud.websecurityscanner.v1beta.ListFindingsResponse\"U\xda\x41\rparent,filter\x82\xd3\xe4\x93\x02?\x12=/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findings\x12\xf9\x01\n\x14ListFindingTypeStats\x12\x43.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest\x1a\x44.google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsResponse\"V\xda\x41\x06parent\x82\xd3\xe4\x93\x02G\x12\x45/v1beta/{parent=projects/*/scanConfigs/*/scanRuns/*}/findingTypeStats\x1aU\xca\x41!websecurityscanner.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa1\x02\n*com.google.cloud.websecurityscanner.v1betaB\x17WebSecurityScannerProtoP\x01ZZcloud.google.com/go/websecurityscanner/apiv1beta/websecurityscannerpb;websecurityscannerpb\xaa\x02&Google.Cloud.WebSecurityScanner.V1Beta\xca\x02&Google\\Cloud\\WebSecurityScanner\\V1beta\xea\x02)Google::Cloud::WebSecurityScanner::V1betab\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.websecurityscanner.v1beta.ScanConfig", "google/cloud/websecurityscanner/v1beta/scan_config.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.cloud.websecurityscanner.v1beta.ScanRun", "google/cloud/websecurityscanner/v1beta/scan_run.proto"], - ["google.cloud.websecurityscanner.v1beta.CrawledUrl", "google/cloud/websecurityscanner/v1beta/crawled_url.proto"], - ["google.cloud.websecurityscanner.v1beta.Finding", "google/cloud/websecurityscanner/v1beta/finding.proto"], - ["google.cloud.websecurityscanner.v1beta.FindingTypeStats", "google/cloud/websecurityscanner/v1beta/finding_type_stats.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module WebSecurityScanner - module V1beta - CreateScanConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.CreateScanConfigRequest").msgclass - DeleteScanConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.DeleteScanConfigRequest").msgclass - GetScanConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.GetScanConfigRequest").msgclass - ListScanConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListScanConfigsRequest").msgclass - UpdateScanConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.UpdateScanConfigRequest").msgclass - ListScanConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListScanConfigsResponse").msgclass - StartScanRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.StartScanRunRequest").msgclass - GetScanRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.GetScanRunRequest").msgclass - ListScanRunsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListScanRunsRequest").msgclass - ListScanRunsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListScanRunsResponse").msgclass - StopScanRunRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.StopScanRunRequest").msgclass - ListCrawledUrlsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListCrawledUrlsRequest").msgclass - ListCrawledUrlsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListCrawledUrlsResponse").msgclass - GetFindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.GetFindingRequest").msgclass - ListFindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListFindingsRequest").msgclass - ListFindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListFindingsResponse").msgclass - ListFindingTypeStatsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsRequest").msgclass - ListFindingTypeStatsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.websecurityscanner.v1beta.ListFindingTypeStatsResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb deleted file mode 100644 index d1cdbdcd623f..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/lib/google/cloud/websecurityscanner/v1beta/web_security_scanner_services_pb.rb +++ /dev/null @@ -1,73 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/websecurityscanner/v1beta/web_security_scanner.proto for package 'Google.Cloud.WebSecurityScanner.V1beta' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# - -require 'grpc' -require 'google/cloud/websecurityscanner/v1beta/web_security_scanner_pb' - -module Google - module Cloud - module WebSecurityScanner - module V1beta - module WebSecurityScanner - # Cloud Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud Platform. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.websecurityscanner.v1beta.WebSecurityScanner' - - # Creates a new ScanConfig. - rpc :CreateScanConfig, ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig - # Deletes an existing ScanConfig and its child resources. - rpc :DeleteScanConfig, ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest, ::Google::Protobuf::Empty - # Gets a ScanConfig. - rpc :GetScanConfig, ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig - # Lists ScanConfigs under a given project. - rpc :ListScanConfigs, ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse - # Updates a ScanConfig. This method support partial update of a ScanConfig. - rpc :UpdateScanConfig, ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig - # Start a ScanRun according to the given ScanConfig. - rpc :StartScanRun, ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun - # Gets a ScanRun. - rpc :GetScanRun, ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun - # Lists ScanRuns under a given ScanConfig, in descending order of ScanRun - # stop time. - rpc :ListScanRuns, ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse - # Stops a ScanRun. The stopped ScanRun is returned. - rpc :StopScanRun, ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun - # List CrawledUrls under a given ScanRun. - rpc :ListCrawledUrls, ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse - # Gets a Finding. - rpc :GetFinding, ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest, ::Google::Cloud::WebSecurityScanner::V1beta::Finding - # List Findings under a given ScanRun. - rpc :ListFindings, ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse - # List all FindingTypeStats under a given ScanRun. - rpc :ListFindingTypeStats, ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest, ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/README.md deleted file mode 100644 index c39a919c1cab..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Web Security Scanner 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-web_security_scanner-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.rb deleted file mode 100644 index 16a4684b0a87..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/crawled_url.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 WebSecurityScanner - module V1beta - # A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web - # Security Scanner Service crawls the web applications, following all links - # within the scope of sites, to find the URLs to test against. - # @!attribute [rw] http_method - # @return [::String] - # The http method of the request that was used to visit the URL, in - # uppercase. - # @!attribute [rw] url - # @return [::String] - # The URL that was crawled. - # @!attribute [rw] body - # @return [::String] - # The body of the request that was used to visit the URL. - class CrawledUrl - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.rb deleted file mode 100644 index b6d583c7a7df..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding.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 WebSecurityScanner - module V1beta - # A Finding resource represents a vulnerability instance identified during a - # ScanRun. - # @!attribute [rw] name - # @return [::String] - # The resource name of the Finding. The name follows the format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanruns/\\{scanRunId}/findings/\\{findingId}'. - # The finding IDs are generated by the system. - # @!attribute [rw] finding_type - # @return [::String] - # The type of the Finding. - # Detailed and up-to-date information on findings can be found here: - # https://cloud.google.com/security-scanner/docs/scan-result-details - # @!attribute [rw] http_method - # @return [::String] - # The http method of the request that triggered the vulnerability, in - # uppercase. - # @!attribute [rw] fuzzed_url - # @return [::String] - # The URL produced by the server-side fuzzer and used in the request that - # triggered the vulnerability. - # @!attribute [rw] body - # @return [::String] - # The body of the request that triggered the vulnerability. - # @!attribute [rw] description - # @return [::String] - # The description of the vulnerability. - # @!attribute [rw] reproduction_url - # @return [::String] - # The URL containing human-readable payload that user can leverage to - # reproduce the vulnerability. - # @!attribute [rw] frame_url - # @return [::String] - # If the vulnerability was originated from nested IFrame, the immediate - # parent IFrame is reported. - # @!attribute [rw] final_url - # @return [::String] - # The URL where the browser lands when the vulnerability is detected. - # @!attribute [rw] tracking_id - # @return [::String] - # The tracking ID uniquely identifies a vulnerability instance across - # multiple ScanRuns. - # @!attribute [rw] form - # @return [::Google::Cloud::WebSecurityScanner::V1beta::Form] - # An addon containing information reported for a vulnerability with an HTML - # form, if any. - # @!attribute [rw] outdated_library - # @return [::Google::Cloud::WebSecurityScanner::V1beta::OutdatedLibrary] - # An addon containing information about outdated libraries. - # @!attribute [rw] violating_resource - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ViolatingResource] - # An addon containing detailed information regarding any resource causing the - # vulnerability such as JavaScript sources, image, audio files, etc. - # @!attribute [rw] vulnerable_headers - # @return [::Google::Cloud::WebSecurityScanner::V1beta::VulnerableHeaders] - # An addon containing information about vulnerable or missing HTTP headers. - # @!attribute [rw] vulnerable_parameters - # @return [::Google::Cloud::WebSecurityScanner::V1beta::VulnerableParameters] - # An addon containing information about request parameters which were found - # to be vulnerable. - # @!attribute [rw] xss - # @return [::Google::Cloud::WebSecurityScanner::V1beta::Xss] - # An addon containing information reported for an XSS, if any. - class Finding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb deleted file mode 100644 index 950dc9db788a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_addon.rb +++ /dev/null @@ -1,111 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1beta - # ! Information about a vulnerability with an HTML. - # @!attribute [rw] action_uri - # @return [::String] - # ! The URI where to send the form when it's submitted. - # @!attribute [rw] fields - # @return [::Array<::String>] - # ! The names of form fields related to the vulnerability. - class Form - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information reported for an outdated library. - # @!attribute [rw] library_name - # @return [::String] - # The name of the outdated library. - # @!attribute [rw] version - # @return [::String] - # The version number. - # @!attribute [rw] learn_more_urls - # @return [::Array<::String>] - # URLs to learn more information about the vulnerabilities in the library. - class OutdatedLibrary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information regarding any resource causing the vulnerability such - # as JavaScript sources, image, audio files, etc. - # @!attribute [rw] content_type - # @return [::String] - # The MIME type of this resource. - # @!attribute [rw] resource_url - # @return [::String] - # URL of this violating resource. - class ViolatingResource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about vulnerable request parameters. - # @!attribute [rw] parameter_names - # @return [::Array<::String>] - # The vulnerable parameter names. - class VulnerableParameters - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about vulnerable or missing HTTP Headers. - # @!attribute [rw] headers - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::VulnerableHeaders::Header>] - # List of vulnerable headers. - # @!attribute [rw] missing_headers - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::VulnerableHeaders::Header>] - # List of missing headers. - class VulnerableHeaders - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a HTTP Header. - # @!attribute [rw] name - # @return [::String] - # Header name. - # @!attribute [rw] value - # @return [::String] - # Header value. - class Header - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Information reported for an XSS. - # @!attribute [rw] stack_traces - # @return [::Array<::String>] - # Stack traces leading to the point where the XSS occurred. - # @!attribute [rw] error_message - # @return [::String] - # An error message generated by a javascript breakage. - class Xss - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb deleted file mode 100644 index a04437f47106..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/finding_type_stats.rb +++ /dev/null @@ -1,39 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1beta - # A FindingTypeStats resource represents stats regarding a specific FindingType - # of Findings under a given ScanRun. - # @!attribute [rw] finding_type - # @return [::String] - # The finding type associated with the stats. - # @!attribute [rw] finding_count - # @return [::Integer] - # The count of findings belonging to this finding type. - class FindingTypeStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb deleted file mode 100644 index b814049f15c4..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config.rb +++ /dev/null @@ -1,192 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1beta - # A ScanConfig resource contains the configurations to launch a scan. - # @!attribute [rw] name - # @return [::String] - # The resource name of the ScanConfig. The name follows the format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. The ScanConfig IDs are - # generated by the system. - # @!attribute [rw] display_name - # @return [::String] - # Required. The user provided display name of the ScanConfig. - # @!attribute [rw] max_qps - # @return [::Integer] - # The maximum QPS during scanning. A valid value ranges from 5 to 20 - # inclusively. If the field is unspecified or its value is set 0, server will - # default to 15. Other values outside of [5, 20] range will be rejected with - # INVALID_ARGUMENT error. - # @!attribute [rw] starting_urls - # @return [::Array<::String>] - # Required. The starting URLs from which the scanner finds site pages. - # @!attribute [rw] authentication - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Authentication] - # The authentication configuration. If specified, service will use the - # authentication configuration during scanning. - # @!attribute [rw] user_agent - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::UserAgent] - # The user agent used during scanning. - # @!attribute [rw] blacklist_patterns - # @return [::Array<::String>] - # The blacklist URL patterns as described in - # https://cloud.google.com/security-scanner/docs/excluded-urls - # @!attribute [rw] schedule - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Schedule] - # The schedule of the ScanConfig. - # @!attribute [rw] target_platforms - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::TargetPlatform>] - # Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be - # used as a default. - # @!attribute [rw] export_to_security_command_center - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::ExportToSecurityCommandCenter] - # Controls export of scan configurations and results to Cloud Security - # Command Center. - # @!attribute [rw] latest_run - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun] - # Latest ScanRun if available. - # @!attribute [rw] risk_level - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::RiskLevel] - # The risk level selected for the scan - class ScanConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Scan authentication configuration. - # @!attribute [rw] google_account - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Authentication::GoogleAccount] - # Authentication using a Google account. - # - # Note: The following fields are mutually exclusive: `google_account`, `custom_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] custom_account - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig::Authentication::CustomAccount] - # Authentication using a custom account. - # - # Note: The following fields are mutually exclusive: `custom_account`, `google_account`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Authentication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes authentication configuration that uses a Google account. - # @!attribute [rw] username - # @return [::String] - # Required. The user name of the Google account. - # @!attribute [rw] password - # @return [::String] - # Required. Input only. The password of the Google account. The credential is stored encrypted - # and not returned in any response nor included in audit logs. - class GoogleAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes authentication configuration that uses a custom account. - # @!attribute [rw] username - # @return [::String] - # Required. The user name of the custom account. - # @!attribute [rw] password - # @return [::String] - # Required. Input only. The password of the custom account. The credential is stored encrypted - # and not returned in any response nor included in audit logs. - # @!attribute [rw] login_url - # @return [::String] - # Required. The login form URL of the website. - class CustomAccount - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Scan schedule configuration. - # @!attribute [rw] schedule_time - # @return [::Google::Protobuf::Timestamp] - # A timestamp indicates when the next run will be scheduled. The value is - # refreshed by the server after each run. If unspecified, it will default - # to current server time, which means the scan will be scheduled to start - # immediately. - # @!attribute [rw] interval_duration_days - # @return [::Integer] - # Required. The duration of time between executions in days. - class Schedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Type of user agents used for scanning. - module UserAgent - # The user agent is unknown. Service will default to CHROME_LINUX. - USER_AGENT_UNSPECIFIED = 0 - - # Chrome on Linux. This is the service default if unspecified. - CHROME_LINUX = 1 - - # Chrome on Android. - CHROME_ANDROID = 2 - - # Safari on IPhone. - SAFARI_IPHONE = 3 - end - - # Cloud platforms supported by Cloud Web Security Scanner. - module TargetPlatform - # The target platform is unknown. Requests with this enum value will be - # rejected with INVALID_ARGUMENT error. - TARGET_PLATFORM_UNSPECIFIED = 0 - - # Google App Engine service. - APP_ENGINE = 1 - - # Google Compute Engine service. - COMPUTE = 2 - end - - # Scan risk levels supported by Cloud Web Security Scanner. LOW impact - # scanning will minimize requests with the potential to modify data. To - # achieve the maximum scan coverage, NORMAL risk level is recommended. - module RiskLevel - # Use default, which is NORMAL. - RISK_LEVEL_UNSPECIFIED = 0 - - # Normal scanning (Recommended) - NORMAL = 1 - - # Lower impact scanning - LOW = 2 - end - - # Controls export of scan configurations and results to Cloud Security - # Command Center. - module ExportToSecurityCommandCenter - # Use default, which is ENABLED. - EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED = 0 - - # Export results of this scan to Cloud Security Command Center. - ENABLED = 1 - - # Do not export results of this scan to Cloud Security Command Center. - DISABLED = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.rb deleted file mode 100644 index 35cbd2e7b0f4..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_config_error.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 WebSecurityScanner - module V1beta - # Defines a custom error message used by CreateScanConfig and UpdateScanConfig - # APIs when scan configuration validation fails. It is also reported as part of - # a ScanRunErrorTrace message if scan validation fails due to a scan - # configuration error. - # @!attribute [rw] code - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfigError::Code] - # Indicates the reason code for a configuration failure. - # @!attribute [rw] field_name - # @return [::String] - # Indicates the full name of the ScanConfig field that triggers this error, - # for example "scan_config.max_qps". This field is provided for - # troubleshooting purposes only and its actual value can change in the - # future. - class ScanConfigError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. - # Defines an error reason code. - # Next id: 44 - module Code - # There is no error. - CODE_UNSPECIFIED = 0 - - # There is no error. - OK = 0 - - # Indicates an internal server error. - # Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown. - INTERNAL_ERROR = 1 - - # One of the seed URLs is an App Engine URL but we cannot validate the scan - # settings due to an App Engine API backend error. - APPENGINE_API_BACKEND_ERROR = 2 - - # One of the seed URLs is an App Engine URL but we cannot access the - # App Engine API to validate scan settings. - APPENGINE_API_NOT_ACCESSIBLE = 3 - - # One of the seed URLs is an App Engine URL but the Default Host of the - # App Engine is not set. - APPENGINE_DEFAULT_HOST_MISSING = 4 - - # Google corporate accounts can not be used for scanning. - CANNOT_USE_GOOGLE_COM_ACCOUNT = 6 - - # The account of the scan creator can not be used for scanning. - CANNOT_USE_OWNER_ACCOUNT = 7 - - # This scan targets Compute Engine, but we cannot validate scan settings - # due to a Compute Engine API backend error. - COMPUTE_API_BACKEND_ERROR = 8 - - # This scan targets Compute Engine, but we cannot access the Compute Engine - # API to validate the scan settings. - COMPUTE_API_NOT_ACCESSIBLE = 9 - - # The Custom Login URL does not belong to the current project. - CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 10 - - # The Custom Login URL is malformed (can not be parsed). - CUSTOM_LOGIN_URL_MALFORMED = 11 - - # The Custom Login URL is mapped to a non-routable IP address in DNS. - CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 12 - - # The Custom Login URL is mapped to an IP address which is not reserved for - # the current project. - CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS = 13 - - # The Custom Login URL has a non-routable IP address. - CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 14 - - # The Custom Login URL has an IP address which is not reserved for the - # current project. - CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS = 15 - - # Another scan with the same name (case-sensitive) already exists. - DUPLICATE_SCAN_NAME = 16 - - # A field is set to an invalid value. - INVALID_FIELD_VALUE = 18 - - # There was an error trying to authenticate to the scan target. - FAILED_TO_AUTHENTICATE_TO_TARGET = 19 - - # Finding type value is not specified in the list findings request. - FINDING_TYPE_UNSPECIFIED = 20 - - # Scan targets Compute Engine, yet current project was not whitelisted for - # Google Compute Engine Scanning Alpha access. - FORBIDDEN_TO_SCAN_COMPUTE = 21 - - # User tries to update managed scan - FORBIDDEN_UPDATE_TO_MANAGED_SCAN = 43 - - # The supplied filter is malformed. For example, it can not be parsed, does - # not have a filter type in expression, or the same filter type appears - # more than once. - MALFORMED_FILTER = 22 - - # The supplied resource name is malformed (can not be parsed). - MALFORMED_RESOURCE_NAME = 23 - - # The current project is not in an active state. - PROJECT_INACTIVE = 24 - - # A required field is not set. - REQUIRED_FIELD = 25 - - # Project id, scanconfig id, scanrun id, or finding id are not consistent - # with each other in resource name. - RESOURCE_NAME_INCONSISTENT = 26 - - # The scan being requested to start is already running. - SCAN_ALREADY_RUNNING = 27 - - # The scan that was requested to be stopped is not running. - SCAN_NOT_RUNNING = 28 - - # One of the seed URLs does not belong to the current project. - SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT = 29 - - # One of the seed URLs is malformed (can not be parsed). - SEED_URL_MALFORMED = 30 - - # One of the seed URLs is mapped to a non-routable IP address in DNS. - SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS = 31 - - # One of the seed URLs is mapped to an IP address which is not reserved - # for the current project. - SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS = 32 - - # One of the seed URLs has on-routable IP address. - SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS = 33 - - # One of the seed URLs has an IP address that is not reserved - # for the current project. - SEED_URL_HAS_UNRESERVED_IP_ADDRESS = 35 - - # The Cloud Security Scanner service account is not configured under the - # project. - SERVICE_ACCOUNT_NOT_CONFIGURED = 36 - - # A project has reached the maximum number of scans. - TOO_MANY_SCANS = 37 - - # Resolving the details of the current project fails. - UNABLE_TO_RESOLVE_PROJECT_INFO = 38 - - # One or more blacklist patterns were in the wrong format. - UNSUPPORTED_BLACKLIST_PATTERN_FORMAT = 39 - - # The supplied filter is not supported. - UNSUPPORTED_FILTER = 40 - - # The supplied finding type is not supported. For example, we do not - # provide findings of the given finding type. - UNSUPPORTED_FINDING_TYPE = 41 - - # The URL scheme of one or more of the supplied URLs is not supported. - UNSUPPORTED_URL_SCHEME = 42 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.rb deleted file mode 100644 index 2ee0a0f3dc7b..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run.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 WebSecurityScanner - module V1beta - # A ScanRun is a output-only resource representing an actual run of the scan. - # Next id: 12 - # @!attribute [rw] name - # @return [::String] - # The resource name of the ScanRun. The name follows the format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # The ScanRun IDs are generated by the system. - # @!attribute [rw] execution_state - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun::ExecutionState] - # The execution state of the ScanRun. - # @!attribute [rw] result_state - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRun::ResultState] - # The result state of the ScanRun. This field is only available after the - # execution state reaches "FINISHED". - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the ScanRun started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the ScanRun reached termination state - that the ScanRun - # is either finished or stopped by user. - # @!attribute [rw] urls_crawled_count - # @return [::Integer] - # The number of URLs crawled during this ScanRun. If the scan is in progress, - # the value represents the number of URLs crawled up to now. - # @!attribute [rw] urls_tested_count - # @return [::Integer] - # The number of URLs tested during this ScanRun. If the scan is in progress, - # the value represents the number of URLs tested up to now. The number of - # URLs tested is usually larger than the number URLS crawled because - # typically a crawled URL is tested with multiple test payloads. - # @!attribute [rw] has_vulnerabilities - # @return [::Boolean] - # Whether the scan run has found any vulnerabilities. - # @!attribute [rw] progress_percent - # @return [::Integer] - # The percentage of total completion ranging from 0 to 100. - # If the scan is in queue, the value is 0. - # If the scan is running, the value ranges from 0 to 100. - # If the scan is finished, the value is 100. - # @!attribute [rw] error_trace - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRunErrorTrace] - # If result_state is an ERROR, this field provides the primary reason for - # scan's termination and more details, if such are available. - # @!attribute [rw] warning_traces - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanRunWarningTrace>] - # A list of warnings, if such are encountered during this scan run. - class ScanRun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Types of ScanRun execution state. - module ExecutionState - # Represents an invalid state caused by internal server error. This value - # should never be returned. - EXECUTION_STATE_UNSPECIFIED = 0 - - # The scan is waiting in the queue. - QUEUED = 1 - - # The scan is in progress. - SCANNING = 2 - - # The scan is either finished or stopped by user. - FINISHED = 3 - end - - # Types of ScanRun result state. - module ResultState - # Default value. This value is returned when the ScanRun is not yet - # finished. - RESULT_STATE_UNSPECIFIED = 0 - - # The scan finished without errors. - SUCCESS = 1 - - # The scan finished with errors. - ERROR = 2 - - # The scan was terminated by user. - KILLED = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.rb deleted file mode 100644 index 9a4290f473e2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_error_trace.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 WebSecurityScanner - module V1beta - # Output only. - # Defines an error trace message for a ScanRun. - # @!attribute [rw] code - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRunErrorTrace::Code] - # Indicates the error reason code. - # @!attribute [rw] scan_config_error - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfigError] - # If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error - # message encountered during scan configuration validation that is performed - # before each scan run. - # @!attribute [rw] most_common_http_error_code - # @return [::Integer] - # If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most - # common HTTP error code, if such is available. For example, if this code is - # 404, the scan has encountered too many NOT_FOUND responses. - class ScanRunErrorTrace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. - # Defines an error reason code. - # Next id: 7 - module Code - # Default value is never used. - CODE_UNSPECIFIED = 0 - - # Indicates that the scan run failed due to an internal server error. - INTERNAL_ERROR = 1 - - # Indicates a scan configuration error, usually due to outdated ScanConfig - # settings, such as starting_urls or the DNS configuration. - SCAN_CONFIG_ISSUE = 2 - - # Indicates an authentication error, usually due to outdated ScanConfig - # authentication settings. - AUTHENTICATION_CONFIG_ISSUE = 3 - - # Indicates a scan operation timeout, usually caused by a very large site. - TIMED_OUT_WHILE_SCANNING = 4 - - # Indicates that a scan encountered excessive redirects, either to - # authentication or some other page outside of the scan scope. - TOO_MANY_REDIRECTS = 5 - - # Indicates that a scan encountered numerous errors from the web site - # pages. When available, most_common_http_error_code field indicates the - # most common HTTP error code encountered during the scan. - TOO_MANY_HTTP_ERRORS = 6 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb deleted file mode 100644 index 14ef8134f765..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/scan_run_warning_trace.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1beta - # Output only. - # Defines a warning trace message for ScanRun. Warning traces provide customers - # with useful information that helps make the scanning process more effective. - # @!attribute [rw] code - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanRunWarningTrace::Code] - # Indicates the warning code. - class ScanRunWarningTrace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Output only. - # Defines a warning message code. - # Next id: 6 - module Code - # Default value is never used. - CODE_UNSPECIFIED = 0 - - # Indicates that a scan discovered an unexpectedly low number of URLs. This - # is sometimes caused by complex navigation features or by using a single - # URL for numerous pages. - INSUFFICIENT_CRAWL_RESULTS = 1 - - # Indicates that a scan discovered too many URLs to test, or excessive - # redundant URLs. - TOO_MANY_CRAWL_RESULTS = 2 - - # Indicates that too many tests have been generated for the scan. Customer - # should try reducing the number of starting URLs, increasing the QPS rate, - # or narrowing down the scope of the scan using the excluded patterns. - TOO_MANY_FUZZ_TASKS = 3 - - # Indicates that a scan is blocked by IAP. - BLOCKED_BY_IAP = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb deleted file mode 100644 index 5c0a8825ce30..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/cloud/websecurityscanner/v1beta/web_security_scanner.rb +++ /dev/null @@ -1,278 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - module V1beta - # Request for the `CreateScanConfig` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name where the scan is created, which should be a - # project resource name in the format 'projects/\\{projectId}'. - # @!attribute [rw] scan_config - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # Required. The ScanConfig to be created. - class CreateScanConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteScanConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanConfig to be deleted. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - class DeleteScanConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetScanConfig` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanConfig to be returned. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - class GetScanConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListScanConfigs` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a project resource name in the - # format 'projects/\\{projectId}'. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of ScanConfigs to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - class ListScanConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateScanConfigRequest` method. - # @!attribute [rw] scan_config - # @return [::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig] - # Required. The ScanConfig to be updated. The name field must be set to identify the - # resource to be updated. The values of fields not covered by the mask - # will be ignored. - # @!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 UpdateScanConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListScanConfigs` method. - # @!attribute [rw] scan_configs - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig>] - # The list of ScanConfigs returned. - # @!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 ListScanConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `StartScanRun` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanConfig to be used. The name follows the - # format of 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - class StartScanRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetScanRun` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanRun to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - class GetScanRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListScanRuns` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a scan resource name in the - # format 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}'. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of ScanRuns to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - class ListScanRunsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListScanRuns` method. - # @!attribute [rw] scan_runs - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::ScanRun>] - # The list of ScanRuns returned. - # @!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 ListScanRunsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `StopScanRun` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the ScanRun to be stopped. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - class StopScanRunRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListCrawledUrls` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of CrawledUrls to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - class ListCrawledUrlsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListCrawledUrls` method. - # @!attribute [rw] crawled_urls - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl>] - # The list of CrawledUrls returned. - # @!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 ListCrawledUrlsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetFinding` method. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Finding to be returned. The name follows the - # format of - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}/findings/\\{findingId}'. - class GetFindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListFindings` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - # @!attribute [rw] filter - # @return [::String] - # Required. The filter expression. The expression must be in the format: - # . - # Supported field: 'finding_type'. - # Supported operator: '='. - # @!attribute [rw] page_token - # @return [::String] - # A token identifying a page of results to be returned. This should be a - # `next_page_token` value returned from a previous List request. - # If unspecified, the first page of results is returned. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of Findings to return, can be limited by server. - # If not specified or not positive, the implementation will select a - # reasonable value. - class ListFindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListFindings` method. - # @!attribute [rw] findings - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::Finding>] - # The list of Findings returned. - # @!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 ListFindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListFindingTypeStats` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name, which should be a scan run resource name in the - # format - # 'projects/\\{projectId}/scanConfigs/\\{scanConfigId}/scanRuns/\\{scanRunId}'. - class ListFindingTypeStatsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListFindingTypeStats` method. - # @!attribute [rw] finding_type_stats - # @return [::Array<::Google::Cloud::WebSecurityScanner::V1beta::FindingTypeStats>] - # The list of FindingTypeStats returned. - class ListFindingTypeStatsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/Gemfile deleted file mode 100644 index 2cf622627fe6..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-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-web_security_scanner-v1beta", path: "../" -else - gem "google-cloud-web_security_scanner-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-web_security_scanner-v1beta/snippets/snippet_metadata_google.cloud.websecurityscanner.v1beta.json b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/snippet_metadata_google.cloud.websecurityscanner.v1beta.json deleted file mode 100644 index 3f5379593bc8..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/snippet_metadata_google.cloud.websecurityscanner.v1beta.json +++ /dev/null @@ -1,535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-web_security_scanner-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.websecurityscanner.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_CreateScanConfig_sync", - "title": "Snippet for the create_scan_config call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#create_scan_config.", - "file": "web_security_scanner/create_scan_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_scan_config", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#create_scan_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "CreateScanConfig", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.CreateScanConfig", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_DeleteScanConfig_sync", - "title": "Snippet for the delete_scan_config call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#delete_scan_config.", - "file": "web_security_scanner/delete_scan_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_scan_config", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#delete_scan_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "DeleteScanConfig", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.DeleteScanConfig", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanConfig_sync", - "title": "Snippet for the get_scan_config call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_config.", - "file": "web_security_scanner/get_scan_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_scan_config", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "GetScanConfig", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.GetScanConfig", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanConfigs_sync", - "title": "Snippet for the list_scan_configs call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_configs.", - "file": "web_security_scanner/list_scan_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scan_configs", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListScanConfigs", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListScanConfigs", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_UpdateScanConfig_sync", - "title": "Snippet for the update_scan_config call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#update_scan_config.", - "file": "web_security_scanner/update_scan_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_scan_config", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#update_scan_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "UpdateScanConfig", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.UpdateScanConfig", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_StartScanRun_sync", - "title": "Snippet for the start_scan_run call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#start_scan_run.", - "file": "web_security_scanner/start_scan_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_scan_run", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#start_scan_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanRun", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "StartScanRun", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.StartScanRun", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanRun_sync", - "title": "Snippet for the get_scan_run call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_run.", - "file": "web_security_scanner/get_scan_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_scan_run", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanRun", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "GetScanRun", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.GetScanRun", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanRuns_sync", - "title": "Snippet for the list_scan_runs call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_runs.", - "file": "web_security_scanner/list_scan_runs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_scan_runs", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_runs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListScanRuns", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListScanRuns", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_StopScanRun_sync", - "title": "Snippet for the stop_scan_run call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#stop_scan_run.", - "file": "web_security_scanner/stop_scan_run.rb", - "language": "RUBY", - "client_method": { - "short_name": "stop_scan_run", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#stop_scan_run", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ScanRun", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "StopScanRun", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.StopScanRun", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListCrawledUrls_sync", - "title": "Snippet for the list_crawled_urls call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_crawled_urls.", - "file": "web_security_scanner/list_crawled_urls.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_crawled_urls", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_crawled_urls", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListCrawledUrls", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListCrawledUrls", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_GetFinding_sync", - "title": "Snippet for the get_finding call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_finding.", - "file": "web_security_scanner/get_finding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_finding", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_finding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::Finding", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "GetFinding", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.GetFinding", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindings_sync", - "title": "Snippet for the list_findings call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_findings.", - "file": "web_security_scanner/list_findings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_findings", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_findings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListFindings", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListFindings", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindingTypeStats_sync", - "title": "Snippet for the list_finding_type_stats call in the WebSecurityScanner service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_finding_type_stats.", - "file": "web_security_scanner/list_finding_type_stats.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_finding_type_stats", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_finding_type_stats", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse", - "client": { - "short_name": "WebSecurityScanner::Client", - "full_name": "::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client" - }, - "method": { - "short_name": "ListFindingTypeStats", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner.ListFindingTypeStats", - "service": { - "short_name": "WebSecurityScanner", - "full_name": "google.cloud.websecurityscanner.v1beta.WebSecurityScanner" - } - } - }, - "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-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_config.rb deleted file mode 100644 index 72531ba34f7c..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/create_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_CreateScanConfig_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the create_scan_config call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#create_scan_config. -# -def create_scan_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new - - # Call the create_scan_config method. - result = client.create_scan_config request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. - p result -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_CreateScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_config.rb deleted file mode 100644 index 4edf65f51798..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/delete_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_DeleteScanConfig_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the delete_scan_config call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#delete_scan_config. -# -def delete_scan_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new - - # Call the delete_scan_config method. - result = client.delete_scan_config request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_DeleteScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb deleted file mode 100644 index 31b8a781be9a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_finding.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START websecurityscanner_v1beta_generated_WebSecurityScanner_GetFinding_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the get_finding call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_finding. -# -def get_finding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new - - # Call the get_finding method. - result = client.get_finding request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::Finding. - p result -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetFinding_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_config.rb deleted file mode 100644 index 54d205419154..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanConfig_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the get_scan_config call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_config. -# -def get_scan_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new - - # Call the get_scan_config method. - result = client.get_scan_config request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. - p result -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_run.rb deleted file mode 100644 index 849242e39e6a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/get_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanRun_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the get_scan_run call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#get_scan_run. -# -def get_scan_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new - - # Call the get_scan_run method. - result = client.get_scan_run request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. - p result -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_GetScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb deleted file mode 100644 index 5909d290f3fe..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_crawled_urls.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START websecurityscanner_v1beta_generated_WebSecurityScanner_ListCrawledUrls_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the list_crawled_urls call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_crawled_urls. -# -def list_crawled_urls - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new - - # Call the list_crawled_urls method. - result = client.list_crawled_urls request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::CrawledUrl. - p item - end -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListCrawledUrls_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb deleted file mode 100644 index c3c3e83e332a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_finding_type_stats.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindingTypeStats_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the list_finding_type_stats call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_finding_type_stats. -# -def list_finding_type_stats - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new - - # Call the list_finding_type_stats method. - result = client.list_finding_type_stats request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse. - p result -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindingTypeStats_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb deleted file mode 100644 index 942fcec7e55d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_findings.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindings_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the list_findings call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_findings. -# -def list_findings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new - - # Call the list_findings method. - result = client.list_findings request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::WebSecurityScanner::V1beta::Finding. - p item - end -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListFindings_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_configs.rb deleted file mode 100644 index 654d77988f2c..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanConfigs_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the list_scan_configs call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_configs. -# -def list_scan_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new - - # Call the list_scan_configs method. - result = client.list_scan_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::WebSecurityScanner::V1beta::ScanConfig. - p item - end -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanConfigs_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_runs.rb deleted file mode 100644 index 37835b22f132..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/list_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanRuns_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the list_scan_runs call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#list_scan_runs. -# -def list_scan_runs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new - - # Call the list_scan_runs method. - result = client.list_scan_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::WebSecurityScanner::V1beta::ScanRun. - p item - end -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_ListScanRuns_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_run.rb deleted file mode 100644 index 645b424b6b29..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/start_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_StartScanRun_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the start_scan_run call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#start_scan_run. -# -def start_scan_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new - - # Call the start_scan_run method. - result = client.start_scan_run request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. - p result -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_StartScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_run.rb deleted file mode 100644 index 894d270fec3b..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/stop_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_StopScanRun_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the stop_scan_run call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#stop_scan_run. -# -def stop_scan_run - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new - - # Call the stop_scan_run method. - result = client.stop_scan_run request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanRun. - p result -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_StopScanRun_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_config.rb deleted file mode 100644 index 7803724b8906..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/snippets/web_security_scanner/update_scan_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 websecurityscanner_v1beta_generated_WebSecurityScanner_UpdateScanConfig_sync] -require "google/cloud/web_security_scanner/v1beta" - -## -# Snippet for the update_scan_config call in the WebSecurityScanner service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client#update_scan_config. -# -def update_scan_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new - - # Call the update_scan_config method. - result = client.update_scan_config request - - # The returned object is of type Google::Cloud::WebSecurityScanner::V1beta::ScanConfig. - p result -end -# [END websecurityscanner_v1beta_generated_WebSecurityScanner_UpdateScanConfig_sync] diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_paths_test.rb deleted file mode 100644 index 8b06894bb244..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_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/web_security_scanner/v1beta/web_security_scanner" - -class ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_finding_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.finding_path project: "value0", scan_config: "value1", scan_run: "value2", finding: "value3" - assert_equal "projects/value0/scanConfigs/value1/scanRuns/value2/findings/value3", 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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.scan_config_path project: "value0", scan_config: "value1" - assert_equal "projects/value0/scanConfigs/value1", path - end - end - - def test_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.scan_run_path project: "value0", scan_config: "value1", scan_run: "value2" - assert_equal "projects/value0/scanConfigs/value1/scanRuns/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb deleted file mode 100644 index 2fe56ab000a3..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_rest_test.rb +++ /dev/null @@ -1,812 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/websecurityscanner/v1beta/web_security_scanner_pb" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner/rest" - - -class ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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_scan_config - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - scan_config = {} - - create_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_create_scan_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_scan_config({ parent: parent, scan_config: scan_config }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_scan_config parent: parent, scan_config: scan_config do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_scan_config({ parent: parent, scan_config: scan_config }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_scan_config_client_stub.call_count - end - end - end - - def test_delete_scan_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_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_delete_scan_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_scan_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_scan_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_scan_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_scan_config_client_stub.call_count - end - end - end - - def test_get_scan_config - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_scan_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_scan_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_scan_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_scan_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_scan_config_client_stub.call_count - end - end - end - - def test_list_scan_configs - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse.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_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_scan_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scan_configs_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_scan_configs parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_scan_configs ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_scan_configs(::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.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_scan_configs_client_stub.call_count - end - end - end - - def test_update_scan_config - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - scan_config = {} - update_mask = {} - - update_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_update_scan_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_scan_config scan_config: scan_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new(scan_config: scan_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new(scan_config: scan_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_scan_config_client_stub.call_count - end - end - end - - def test_start_scan_run - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - start_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_start_scan_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_scan_run_client_stub.call_count - end - end - end - - def test_get_scan_run - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_scan_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_scan_run_client_stub.call_count - end - end - end - - def test_list_scan_runs - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse.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_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_scan_runs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_scan_runs_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_scan_runs parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_scan_runs ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_scan_runs(::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.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_scan_runs_client_stub.call_count - end - end - end - - def test_stop_scan_run - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - stop_scan_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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_stop_scan_run_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, stop_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.stop_scan_run({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.stop_scan_run name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.stop_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.stop_scan_run({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.stop_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, stop_scan_run_client_stub.call_count - end - end - end - - def test_list_crawled_urls - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse.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_crawled_urls_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_crawled_urls_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_crawled_urls_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_crawled_urls parent: parent, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_crawled_urls ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_crawled_urls(::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.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_crawled_urls_client_stub.call_count - end - end - end - - def test_get_finding - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::Finding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_finding_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_get_finding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_finding_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_finding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_finding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_finding ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_finding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_finding(::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_finding_client_stub.call_count - end - end - end - - def test_list_findings - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_findings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_findings_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_findings parent: parent, filter: filter, page_token: page_token, page_size: page_size do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_findings ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_findings(::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_count - end - end - end - - def test_list_finding_type_stats - # Create test objects. - client_result = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - list_finding_type_stats_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::ServiceStub.stub :transcode_list_finding_type_stats_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_finding_type_stats_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_finding_type_stats({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_finding_type_stats parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_finding_type_stats ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_finding_type_stats({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_finding_type_stats(::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_finding_type_stats_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::WebSecurityScanner::V1beta::WebSecurityScanner::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::WebSecurityScanner::V1beta::WebSecurityScanner::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb deleted file mode 100644 index 25a2ab5f9477..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/google/cloud/web_security_scanner/v1beta/web_security_scanner_test.rb +++ /dev/null @@ -1,900 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/websecurityscanner/v1beta/web_security_scanner_pb" -require "google/cloud/web_security_scanner/v1beta/web_security_scanner" - -class ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::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_scan_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - scan_config = {} - - create_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_scan_config, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig), request["scan_config"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_scan_config({ parent: parent, scan_config: scan_config }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_scan_config parent: parent, scan_config: scan_config do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_scan_config({ parent: parent, scan_config: scan_config }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::CreateScanConfigRequest.new(parent: parent, scan_config: scan_config), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_scan_config_client_stub.call_rpc_count - end - end - - def test_delete_scan_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_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_scan_config, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_scan_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_scan_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_scan_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::DeleteScanConfigRequest.new(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_scan_config_client_stub.call_rpc_count - end - end - - def test_get_scan_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_scan_config, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_scan_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_scan_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_scan_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::GetScanConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_scan_config_client_stub.call_rpc_count - end - end - - def test_list_scan_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_scan_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scan_configs, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest, 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_scan_configs_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_scan_configs parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_scan_configs ::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_scan_configs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_scan_configs(::Google::Cloud::WebSecurityScanner::V1beta::ListScanConfigsRequest.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_scan_configs_client_stub.call_rpc_count - end - end - - def test_update_scan_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - scan_config = {} - update_mask = {} - - update_scan_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_scan_config, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::WebSecurityScanner::V1beta::ScanConfig), request["scan_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_scan_config_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_scan_config({ scan_config: scan_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_scan_config scan_config: scan_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_scan_config ::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new(scan_config: scan_config, update_mask: update_mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_scan_config({ scan_config: scan_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 - client.update_scan_config(::Google::Cloud::WebSecurityScanner::V1beta::UpdateScanConfigRequest.new(scan_config: scan_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_scan_config_client_stub.call_rpc_count - end - end - - def test_start_scan_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_scan_run, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_scan_run({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::StartScanRunRequest.new(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_scan_run_client_stub.call_rpc_count - end - end - - def test_get_scan_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_scan_run, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_scan_run({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::GetScanRunRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_scan_run_client_stub.call_rpc_count - end - end - - def test_list_scan_runs - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_scan_runs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_scan_runs, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest, 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_scan_runs_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_scan_runs parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_scan_runs ::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_scan_runs({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_scan_runs(::Google::Cloud::WebSecurityScanner::V1beta::ListScanRunsRequest.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_scan_runs_client_stub.call_rpc_count - end - end - - def test_stop_scan_run - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ScanRun.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_scan_run_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :stop_scan_run, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, stop_scan_run_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.stop_scan_run({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.stop_scan_run name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.stop_scan_run ::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.stop_scan_run({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.stop_scan_run(::Google::Cloud::WebSecurityScanner::V1beta::StopScanRunRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, stop_scan_run_client_stub.call_rpc_count - end - end - - def test_list_crawled_urls - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = 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_crawled_urls_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_crawled_urls, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest, 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_crawled_urls_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_crawled_urls parent: parent, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_crawled_urls ::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.new(parent: parent, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_crawled_urls({ parent: parent, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_crawled_urls(::Google::Cloud::WebSecurityScanner::V1beta::ListCrawledUrlsRequest.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_crawled_urls_client_stub.call_rpc_count - end - end - - def test_get_finding - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::Finding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_finding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_finding, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_finding_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_finding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_finding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_finding ::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_finding({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_finding(::Google::Cloud::WebSecurityScanner::V1beta::GetFindingRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_finding_client_stub.call_rpc_count - end - end - - def test_list_findings - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - filter = "hello world" - page_token = "hello world" - page_size = 42 - - list_findings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_findings, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_findings_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_findings parent: parent, filter: filter, page_token: page_token, page_size: page_size do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_findings ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_findings({ parent: parent, filter: filter, page_token: page_token, page_size: page_size }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_findings(::Google::Cloud::WebSecurityScanner::V1beta::ListFindingsRequest.new(parent: parent, filter: filter, page_token: page_token, page_size: page_size), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_findings_client_stub.call_rpc_count - end - end - - def test_list_finding_type_stats - # Create GRPC objects. - grpc_response = ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - list_finding_type_stats_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_finding_type_stats, name - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_finding_type_stats_client_stub do - # Create client - client = ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_finding_type_stats({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_finding_type_stats parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_finding_type_stats ::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new(parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_finding_type_stats({ parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_finding_type_stats(::Google::Cloud::WebSecurityScanner::V1beta::ListFindingTypeStatsRequest.new(parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_finding_type_stats_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::WebSecurityScanner::V1beta::WebSecurityScanner::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::WebSecurityScanner::V1beta::WebSecurityScanner::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::WebSecurityScanner::V1beta::WebSecurityScanner::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::WebSecurityScanner::V1beta::WebSecurityScanner::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-web_security_scanner/.gitignore b/owl-bot-staging/google-cloud-web_security_scanner/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-web_security_scanner/.repo-metadata.json b/owl-bot-staging/google-cloud-web_security_scanner/.repo-metadata.json deleted file mode 100644 index dfc1121d66d3..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "websecurityscanner.googleapis.com", - "api_shortname": "websecurityscanner", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner/latest", - "distribution_name": "google-cloud-web_security_scanner", - "is_cloud": true, - "language": "ruby", - "name": "websecurityscanner", - "name_pretty": "Web Security Scanner API", - "product_documentation": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities.", - "ruby-cloud-env-prefix": "WEB_SECURITY_SCANNER", - "ruby-cloud-product-url": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-web_security_scanner/.rubocop.yml b/owl-bot-staging/google-cloud-web_security_scanner/.rubocop.yml deleted file mode 100644 index 6eb251abd513..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-web_security_scanner.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-cloud-web_security_scanner.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-web_security_scanner/.toys.rb b/owl-bot-staging/google-cloud-web_security_scanner/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/.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-web_security_scanner/.yardopts b/owl-bot-staging/google-cloud-web_security_scanner/.yardopts deleted file mode 100644 index c7306527682d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Web Security Scanner API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-web_security_scanner/AUTHENTICATION.md b/owl-bot-staging/google-cloud-web_security_scanner/AUTHENTICATION.md deleted file mode 100644 index 3643ec6213db..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-web_security_scanner 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-web_security_scanner 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/web_security_scanner" - -client = Google::Cloud::WebSecurityScanner.web_security_scanner do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/web_security_scanner" - -Google::Cloud::WebSecurityScanner.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::WebSecurityScanner.web_security_scanner -``` - -### 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-web_security_scanner -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/web_security_scanner" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::WebSecurityScanner.web_security_scanner -``` - -### 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-web_security_scanner/CHANGELOG.md b/owl-bot-staging/google-cloud-web_security_scanner/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-web_security_scanner/Gemfile b/owl-bot-staging/google-cloud-web_security_scanner/Gemfile deleted file mode 100644 index 3f31cd6feb85..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-web_security_scanner-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-web_security_scanner.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-web_security_scanner/LICENSE.md b/owl-bot-staging/google-cloud-web_security_scanner/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/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-web_security_scanner/README.md b/owl-bot-staging/google-cloud-web_security_scanner/README.md deleted file mode 100644 index 92aa0e027e3f..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Web Security Scanner API - -API Client library for the Web Security Scanner API - -Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-web_security_scanner-v*`. -The gem `google-cloud-web_security_scanner` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner/latest) -for this library, google-cloud-web_security_scanner, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-web_security_scanner-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-web_security_scanner -``` - -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/websecurityscanner.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/web_security_scanner" - -client = Google::Cloud::WebSecurityScanner.web_security_scanner -request = ::Google::Cloud::WebSecurityScanner::V1::CreateScanConfigRequest.new # (request fields as keyword arguments...) -response = client.create_scan_config request -``` - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-web_security_scanner-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-web_security_scanner`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-web_security_scanner-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-web_security_scanner`. -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-web_security_scanner-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-web_security_scanner/Rakefile b/owl-bot-staging/google-cloud-web_security_scanner/Rakefile deleted file mode 100644 index 5a691367e9a9..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-web_security_scanner acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WEB_SECURITY_SCANNER_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WEB_SECURITY_SCANNER_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 WEB_SECURITY_SCANNER_TEST_PROJECT=test123 WEB_SECURITY_SCANNER_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/web_security_scanner/v1/web_security_scanner/credentials" - ::Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WEB_SECURITY_SCANNER_PROJECT"] = project - ENV["WEB_SECURITY_SCANNER_TEST_PROJECT"] = project - ENV["WEB_SECURITY_SCANNER_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-web_security_scanner 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-web_security_scanner 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-web_security_scanner 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-web_security_scanner gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-web_security_scanner" - header "google-cloud-web_security_scanner rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-web_security_scanner yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-web_security_scanner 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-web_security_scanner 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-web_security_scanner 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-web_security_scanner/google-cloud-web_security_scanner.gemspec b/owl-bot-staging/google-cloud-web_security_scanner/google-cloud-web_security_scanner.gemspec deleted file mode 100644 index 894eb3dc0ac2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/google-cloud-web_security_scanner.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/web_security_scanner/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-web_security_scanner" - gem.version = Google::Cloud::WebSecurityScanner::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Web Security Scanner scans your Compute and App Engine apps for common web vulnerabilities." - gem.summary = "API Client library for the Web Security Scanner API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-web_security_scanner-v1", "~> 1.2" -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner/lib/google-cloud-web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner/lib/google-cloud-web_security_scanner.rb deleted file mode 100644 index e947e723891d..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/lib/google-cloud-web_security_scanner.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/web_security_scanner" unless defined? Google::Cloud::WebSecurityScanner::VERSION diff --git a/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner.rb b/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner.rb deleted file mode 100644 index 97bf39b654f7..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/web_security_scanner/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :web_security_scanner do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module WebSecurityScanner - ## - # Create a new client object for WebSecurityScanner. - # - # By default, this returns an instance of - # [Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-web_security_scanner-v1/latest/Google-Cloud-WebSecurityScanner-V1-WebSecurityScanner-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the WebSecurityScanner service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the WebSecurityScanner service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::WebSecurityScanner.web_security_scanner_available?}. - # - # ## About WebSecurityScanner - # - # Web Security Scanner Service identifies security vulnerabilities in web - # applications hosted on Google Cloud. It crawls your application, and - # attempts to exercise as many user inputs and event handlers as possible. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.web_security_scanner version: :v1, transport: :grpc, &block - require "google/cloud/web_security_scanner/#{version.to_s.downcase}" - - package_name = Google::Cloud::WebSecurityScanner - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::WebSecurityScanner.const_get(package_name).const_get(:WebSecurityScanner) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the WebSecurityScanner service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::WebSecurityScanner.web_security_scanner}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the WebSecurityScanner service, - # or if the versioned client gem needs an update to support the WebSecurityScanner service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.web_security_scanner_available? version: :v1, transport: :grpc - require "google/cloud/web_security_scanner/#{version.to_s.downcase}" - package_name = Google::Cloud::WebSecurityScanner - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::WebSecurityScanner.const_get package_name - return false unless service_module.const_defined? :WebSecurityScanner - service_module = service_module.const_get :WebSecurityScanner - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-web_security_scanner library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.web_security_scanner if block_given? - - ::Google::Cloud.configure.web_security_scanner - end - end - end -end - -helper_path = ::File.join __dir__, "web_security_scanner", "helpers.rb" -require "google/cloud/web_security_scanner/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner/version.rb b/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner/version.rb deleted file mode 100644 index 7a2e86278151..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/lib/google/cloud/web_security_scanner/version.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module WebSecurityScanner - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/client_test.rb b/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/client_test.rb deleted file mode 100644 index 9e2214b9193a..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/web_security_scanner" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::WebSecurityScanner::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_web_security_scanner_grpc - skip unless Google::Cloud::WebSecurityScanner.web_security_scanner_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::WebSecurityScanner.web_security_scanner transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Client, client - end - end - - def test_web_security_scanner_rest - skip unless Google::Cloud::WebSecurityScanner.web_security_scanner_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::WebSecurityScanner.web_security_scanner transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::WebSecurityScanner::V1::WebSecurityScanner::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/version_test.rb b/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/version_test.rb deleted file mode 100644 index 41a6555f0a05..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/test/google/cloud/web_security_scanner/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/web_security_scanner/version" - -class Google::Cloud::WebSecurityScanner::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::WebSecurityScanner::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-web_security_scanner/test/helper.rb b/owl-bot-staging/google-cloud-web_security_scanner/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-web_security_scanner/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows-executions-v1/.repo-metadata.json deleted file mode 100644 index 29631f032d47..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "workflowexecutions.googleapis.com", - "api_shortname": "workflowexecutions", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest", - "distribution_name": "google-cloud-workflows-executions-v1", - "is_cloud": true, - "language": "ruby", - "name": "workflowexecutions", - "name_pretty": "Workflows Executions V1 API", - "product_documentation": "https://cloud.google.com/workflows/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-executions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details.", - "ruby-cloud-env-prefix": "WORKFLOWS", - "ruby-cloud-product-url": "https://cloud.google.com/workflows/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.rubocop.yml b/owl-bot-staging/google-cloud-workflows-executions-v1/.rubocop.yml deleted file mode 100644 index ba04c515e3d9..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workflows-executions-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-workflows-executions-v1.rb" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/.toys.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/.yardopts b/owl-bot-staging/google-cloud-workflows-executions-v1/.yardopts deleted file mode 100644 index f0b454dc3245..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Workflows Executions 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-workflows-executions-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows-executions-v1/AUTHENTICATION.md deleted file mode 100644 index 73a695e2f97f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workflows-executions-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-workflows-executions-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/workflows/executions/v1" - -client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workflows/executions/v1" - -::Google::Cloud::Workflows::Executions::V1::Executions::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Workflows::Executions::V1::Executions::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-workflows-executions-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/workflows/executions/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Workflows::Executions::V1::Executions::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-workflows-executions-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows-executions-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile b/owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/LICENSE.md b/owl-bot-staging/google-cloud-workflows-executions-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/README.md b/owl-bot-staging/google-cloud-workflows-executions-v1/README.md deleted file mode 100644 index 1fad0660e45e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Workflows Executions V1 API - -Execute workflows created with Workflows API. - -Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Workflows Executions V1 API. Most users should consider using -the main client gem, -[google-cloud-workflows](https://rubygems.org/gems/google-cloud-workflows). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-workflows-executions-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/workflowexecutions.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/workflows/executions/v1" - -client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new -request = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new # (request fields as keyword arguments...) -response = client.list_executions request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/workflows/) -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/workflows/executions/v1" -require "logger" - -client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workflows`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workflows-executions-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-workflows`. -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-workflows-executions-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-workflows-executions-v1/Rakefile b/owl-bot-staging/google-cloud-workflows-executions-v1/Rakefile deleted file mode 100644 index 44509fa79f79..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WORKFLOWS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WORKFLOWS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/workflows/executions/v1/executions/credentials" - ::Google::Cloud::Workflows::Executions::V1::Executions::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WORKFLOWS_PROJECT"] = project - ENV["WORKFLOWS_TEST_PROJECT"] = project - ENV["WORKFLOWS_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-workflows-executions-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-workflows-executions-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-workflows-executions-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-workflows-executions-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workflows-executions-v1" - header "google-cloud-workflows-executions-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workflows-executions-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workflows-executions-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-workflows-executions-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-workflows-executions-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-workflows-executions-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-workflows-executions-v1/gapic_metadata.json deleted file mode 100644 index 7c61feeebf2d..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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.workflows.executions.v1", - "libraryPackage": "::Google::Cloud::Workflows::Executions::V1", - "services": { - "Executions": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Workflows::Executions::V1::Executions::Client", - "rpcs": { - "ListExecutions": { - "methods": [ - "list_executions" - ] - }, - "CreateExecution": { - "methods": [ - "create_execution" - ] - }, - "GetExecution": { - "methods": [ - "get_execution" - ] - }, - "CancelExecution": { - "methods": [ - "cancel_execution" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/google-cloud-workflows-executions-v1.gemspec b/owl-bot-staging/google-cloud-workflows-executions-v1/google-cloud-workflows-executions-v1.gemspec deleted file mode 100644 index 1e05a1b2b58e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/google-cloud-workflows-executions-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workflows/executions/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workflows-executions-v1" - gem.version = Google::Cloud::Workflows::Executions::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-executions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details." - gem.summary = "Execute workflows created with Workflows API." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-v1.rb deleted file mode 100644 index fc4b162a318b..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google-cloud-workflows-executions-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/workflows/executions/v1" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1.rb deleted file mode 100644 index 3c540505d083..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/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/workflows/executions/v1/executions" -require "google/cloud/workflows/executions/v1/version" - -module Google - module Cloud - module Workflows - module Executions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/workflows/executions/v1" - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/workflows/executions/v1" - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/workflows/executions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.rb deleted file mode 100644 index b39a54aa895b..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions.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/workflows/executions/v1/version" - -require "google/cloud/workflows/executions/v1/executions/credentials" -require "google/cloud/workflows/executions/v1/executions/paths" -require "google/cloud/workflows/executions/v1/executions/client" -require "google/cloud/workflows/executions/v1/executions/rest" - -module Google - module Cloud - module Workflows - module Executions - module V1 - ## - # Executions is used to start and manage running instances of - # [Workflows][google.cloud.workflows.v1.Workflow] called executions. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/workflows/executions/v1/executions" - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/workflows/executions/v1/executions/rest" - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new - # - module Executions - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "executions", "helpers.rb" -require "google/cloud/workflows/executions/v1/executions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb deleted file mode 100644 index 96f7f1a299d5..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/client.rb +++ /dev/null @@ -1,802 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/workflows/executions/v1/executions_pb" - -module Google - module Cloud - module Workflows - module Executions - module V1 - module Executions - ## - # Client for the Executions service. - # - # Executions is used to start and manage running instances of - # [Workflows][google.cloud.workflows.v1.Workflow] called executions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflowexecutions.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :executions_stub - - ## - # Configure the Executions Client class. - # - # See {::Google::Cloud::Workflows::Executions::V1::Executions::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Executions clients - # ::Google::Cloud::Workflows::Executions::V1::Executions::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workflows", "Executions", "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 Executions Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workflows::Executions::V1::Executions::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @executions_stub.universe_domain - end - - ## - # Create a new Executions client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Executions 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/workflows/executions/v1/executions_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 - - @executions_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Workflows::Executions::V1::Executions::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 - ) - - @executions_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 - @executions_stub.logger - end - - # Service calls - - ## - # Returns a list of executions which belong to the workflow with - # the given name. The method returns executions of all workflow - # revisions. Returned executions are ordered by their start time (newest - # first). - # - # @overload list_executions(request, options = nil) - # Pass arguments to `list_executions` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_executions(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil, order_by: nil) - # Pass arguments to `list_executions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the workflow for which the executions should be listed. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @param page_size [::Integer] - # Maximum number of executions to return per call. - # Max supported value depends on the selected Execution view: it's 1000 for - # BASIC and 100 for FULL. The default value used if the field is not - # specified is 100, regardless of the selected view. Values greater than - # the max value will be coerced down to it. - # @param page_token [::String] - # A page token, received from a previous `ListExecutions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListExecutions` must - # match the call that provided the page token. - # - # Note that pagination is applied to dynamic data. The list of executions - # returned can change between page requests. - # @param view [::Google::Cloud::Workflows::Executions::V1::ExecutionView] - # Optional. A view defining which fields should be filled in the returned - # executions. The API will default to the BASIC view. - # @param filter [::String] - # Optional. Filters applied to the [Executions.ListExecutions] results. - # The following fields are supported for filtering: - # executionID, state, startTime, endTime, duration, workflowRevisionID, - # stepName, and label. - # @param order_by [::String] - # Optional. The ordering applied to the [Executions.ListExecutions] results. - # By default the ordering is based on descending start time. - # The following fields are supported for order by: - # executionID, startTime, endTime, duration, state, and workflowRevisionID. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1::Execution>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1::Execution>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new - # - # # Call the list_executions method. - # result = client.list_executions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workflows::Executions::V1::Execution. - # p item - # end - # - def list_executions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_executions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_executions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_executions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.call_rpc :list_executions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @executions_stub, :list_executions, request, response, 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 execution using the latest revision of the given workflow. - # - # @overload create_execution(request, options = nil) - # Pass arguments to `create_execution` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_execution(parent: nil, execution: nil) - # Pass arguments to `create_execution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the workflow for which an execution should be created. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # The latest revision of the workflow will be used. - # @param execution [::Google::Cloud::Workflows::Executions::V1::Execution, ::Hash] - # Required. Execution to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workflows::Executions::V1::Execution] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new - # - # # Call the create_execution method. - # result = client.create_execution request - # - # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. - # p result - # - def create_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_execution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_execution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.call_rpc :create_execution, request, 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 an execution of the given name. - # - # @overload get_execution(request, options = nil) - # Pass arguments to `get_execution` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_execution(name: nil, view: nil) - # Pass arguments to `get_execution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the execution to be retrieved. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # @param view [::Google::Cloud::Workflows::Executions::V1::ExecutionView] - # Optional. A view defining which fields should be filled in the returned - # execution. The API will default to the FULL view. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workflows::Executions::V1::Execution] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new - # - # # Call the get_execution method. - # result = client.get_execution request - # - # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. - # p result - # - def get_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_execution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_execution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.call_rpc :get_execution, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancels an execution of the given name. - # - # @overload cancel_execution(request, options = nil) - # Pass arguments to `cancel_execution` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_execution(name: nil) - # Pass arguments to `cancel_execution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the execution to be cancelled. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workflows::Executions::V1::Execution] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new - # - # # Call the cancel_execution method. - # result = client.cancel_execution request - # - # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. - # p result - # - def cancel_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest - - # Converts hash and nil to 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_execution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_execution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.call_rpc :cancel_execution, request, 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 Executions API. - # - # This class represents the configuration for Executions, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Workflows::Executions::V1::Executions::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_executions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workflows::Executions::V1::Executions::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_executions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_executions.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Workflows::Executions::V1::Executions::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflowexecutions.googleapis.com" - - config_attr :endpoint, nil, ::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 Executions API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_executions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_executions - ## - # RPC-specific configuration for `create_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :create_execution - ## - # RPC-specific configuration for `get_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :get_execution - ## - # RPC-specific configuration for `cancel_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_execution - - # @private - def initialize parent_rpcs = nil - list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions - @list_executions = ::Gapic::Config::Method.new list_executions_config - create_execution_config = parent_rpcs.create_execution if parent_rpcs.respond_to? :create_execution - @create_execution = ::Gapic::Config::Method.new create_execution_config - get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution - @get_execution = ::Gapic::Config::Method.new get_execution_config - cancel_execution_config = parent_rpcs.cancel_execution if parent_rpcs.respond_to? :cancel_execution - @cancel_execution = ::Gapic::Config::Method.new cancel_execution_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/credentials.rb deleted file mode 100644 index 6a4511ebd935..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/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 Workflows - module Executions - module V1 - module Executions - # Credentials for the Executions API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "WORKFLOWS_CREDENTIALS", - "WORKFLOWS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "WORKFLOWS_CREDENTIALS_JSON", - "WORKFLOWS_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-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb deleted file mode 100644 index 4cbadc66f285..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/paths.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Workflows - module Executions - module V1 - module Executions - # Path helper methods for the Executions API. - module Paths - ## - # Create a fully-qualified Execution resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}` - # - # @param project [String] - # @param location [String] - # @param workflow [String] - # @param execution [String] - # - # @return [::String] - def execution_path project:, location:, workflow:, execution: - 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}/executions/#{execution}" - end - - ## - # Create a fully-qualified Workflow 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 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-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest.rb deleted file mode 100644 index 46394ec79f74..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/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/workflows/executions/v1/version" - -require "google/cloud/workflows/executions/v1/executions/credentials" -require "google/cloud/workflows/executions/v1/executions/paths" -require "google/cloud/workflows/executions/v1/executions/rest/client" - -module Google - module Cloud - module Workflows - module Executions - module V1 - ## - # Executions is used to start and manage running instances of - # [Workflows][google.cloud.workflows.v1.Workflow] called executions. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/workflows/executions/v1/executions/rest" - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new - # - module Executions - # 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/workflows/executions/v1/executions/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb deleted file mode 100644 index 7fc0368a6891..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/client.rb +++ /dev/null @@ -1,731 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/workflows/executions/v1/executions_pb" -require "google/cloud/workflows/executions/v1/executions/rest/service_stub" - -module Google - module Cloud - module Workflows - module Executions - module V1 - module Executions - module Rest - ## - # REST client for the Executions service. - # - # Executions is used to start and manage running instances of - # [Workflows][google.cloud.workflows.v1.Workflow] called executions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflowexecutions.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :executions_stub - - ## - # Configure the Executions Client class. - # - # See {::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Executions clients - # ::Google::Cloud::Workflows::Executions::V1::Executions::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", "Workflows", "Executions", "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 Executions Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workflows::Executions::V1::Executions::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 - @executions_stub.universe_domain - end - - ## - # Create a new Executions REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Executions 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 - - @executions_stub = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @executions_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 - @executions_stub.logger - end - - # Service calls - - ## - # Returns a list of executions which belong to the workflow with - # the given name. The method returns executions of all workflow - # revisions. Returned executions are ordered by their start time (newest - # first). - # - # @overload list_executions(request, options = nil) - # Pass arguments to `list_executions` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_executions(parent: nil, page_size: nil, page_token: nil, view: nil, filter: nil, order_by: nil) - # Pass arguments to `list_executions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the workflow for which the executions should be listed. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @param page_size [::Integer] - # Maximum number of executions to return per call. - # Max supported value depends on the selected Execution view: it's 1000 for - # BASIC and 100 for FULL. The default value used if the field is not - # specified is 100, regardless of the selected view. Values greater than - # the max value will be coerced down to it. - # @param page_token [::String] - # A page token, received from a previous `ListExecutions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListExecutions` must - # match the call that provided the page token. - # - # Note that pagination is applied to dynamic data. The list of executions - # returned can change between page requests. - # @param view [::Google::Cloud::Workflows::Executions::V1::ExecutionView] - # Optional. A view defining which fields should be filled in the returned - # executions. The API will default to the BASIC view. - # @param filter [::String] - # Optional. Filters applied to the [Executions.ListExecutions] results. - # The following fields are supported for filtering: - # executionID, state, startTime, endTime, duration, workflowRevisionID, - # stepName, and label. - # @param order_by [::String] - # Optional. The ordering applied to the [Executions.ListExecutions] results. - # By default the ordering is based on descending start time. - # The following fields are supported for order by: - # executionID, startTime, endTime, duration, state, and workflowRevisionID. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1::Execution>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1::Execution>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new - # - # # Call the list_executions method. - # result = client.list_executions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workflows::Executions::V1::Execution. - # p item - # end - # - def list_executions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_executions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_executions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_executions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.list_executions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @executions_stub, :list_executions, "executions", request, result, 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 execution using the latest revision of the given workflow. - # - # @overload create_execution(request, options = nil) - # Pass arguments to `create_execution` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_execution(parent: nil, execution: nil) - # Pass arguments to `create_execution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the workflow for which an execution should be created. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # The latest revision of the workflow will be used. - # @param execution [::Google::Cloud::Workflows::Executions::V1::Execution, ::Hash] - # Required. Execution to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new - # - # # Call the create_execution method. - # result = client.create_execution request - # - # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. - # p result - # - def create_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest - - # Converts hash and nil to an 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_execution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_execution.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.create_execution request, 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 an execution of the given name. - # - # @overload get_execution(request, options = nil) - # Pass arguments to `get_execution` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_execution(name: nil, view: nil) - # Pass arguments to `get_execution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the execution to be retrieved. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # @param view [::Google::Cloud::Workflows::Executions::V1::ExecutionView] - # Optional. A view defining which fields should be filled in the returned - # execution. The API will default to the FULL view. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new - # - # # Call the get_execution method. - # result = client.get_execution request - # - # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. - # p result - # - def get_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_execution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_execution.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.get_execution request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancels an execution of the given name. - # - # @overload cancel_execution(request, options = nil) - # Pass arguments to `cancel_execution` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_execution(name: nil) - # Pass arguments to `cancel_execution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the execution to be cancelled. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new - # - # # Call the cancel_execution method. - # result = client.cancel_execution request - # - # # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. - # p result - # - def cancel_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest - - # Converts hash and nil to an 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_execution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_execution.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.cancel_execution request, 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 Executions REST API. - # - # This class represents the configuration for Executions 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::Workflows::Executions::V1::Executions::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_executions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_executions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_executions.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflowexecutions.googleapis.com" - - config_attr :endpoint, nil, ::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 Executions API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_executions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_executions - ## - # RPC-specific configuration for `create_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :create_execution - ## - # RPC-specific configuration for `get_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :get_execution - ## - # RPC-specific configuration for `cancel_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_execution - - # @private - def initialize parent_rpcs = nil - list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions - @list_executions = ::Gapic::Config::Method.new list_executions_config - create_execution_config = parent_rpcs.create_execution if parent_rpcs.respond_to? :create_execution - @create_execution = ::Gapic::Config::Method.new create_execution_config - get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution - @get_execution = ::Gapic::Config::Method.new get_execution_config - cancel_execution_config = parent_rpcs.cancel_execution if parent_rpcs.respond_to? :cancel_execution - @cancel_execution = ::Gapic::Config::Method.new cancel_execution_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-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb deleted file mode 100644 index 5c82daaa16de..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions/rest/service_stub.rb +++ /dev/null @@ -1,329 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workflows/executions/v1/executions_pb" - -module Google - module Cloud - module Workflows - module Executions - module V1 - module Executions - module Rest - ## - # REST service stub for the Executions 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_executions REST call - # - # @param request_pb [::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse] - # A result object deserialized from the server's reply - def list_executions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_executions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_executions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse.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_execution REST call - # - # @param request_pb [::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # A result object deserialized from the server's reply - def create_execution request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_execution_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_execution", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workflows::Executions::V1::Execution.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_execution REST call - # - # @param request_pb [::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # A result object deserialized from the server's reply - def get_execution request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_execution_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_execution", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workflows::Executions::V1::Execution.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_execution REST call - # - # @param request_pb [::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::Executions::V1::Execution] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # A result object deserialized from the server's reply - def cancel_execution request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_execution_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_execution", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workflows::Executions::V1::Execution.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_executions REST call - # - # @param request_pb [::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_executions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/executions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_execution REST call - # - # @param request_pb [::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest] - # 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_execution_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/executions", - body: "execution", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_execution REST call - # - # @param request_pb [::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_execution_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_execution REST call - # - # @param request_pb [::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest] - # 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_execution_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb deleted file mode 100644 index 20434bf43184..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/lib/google/cloud/workflows/executions/v1/executions_pb.rb +++ /dev/null @@ -1,69 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/workflows/executions/v1/executions.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/workflows/executions/v1/executions.proto\x12$google.cloud.workflows.executions.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x0e\n\tExecution\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x30\n\x08\x64uration\x18\x0c \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12I\n\x05state\x18\x04 \x01(\x0e\x32\x35.google.cloud.workflows.executions.v1.Execution.StateB\x03\xe0\x41\x03\x12\x10\n\x08\x61rgument\x18\x05 \x01(\t\x12\x13\n\x06result\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12I\n\x05\x65rror\x18\x07 \x01(\x0b\x32\x35.google.cloud.workflows.executions.v1.Execution.ErrorB\x03\xe0\x41\x03\x12!\n\x14workflow_revision_id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12T\n\x0e\x63\x61ll_log_level\x18\t \x01(\x0e\x32<.google.cloud.workflows.executions.v1.Execution.CallLogLevel\x12K\n\x06status\x18\n \x01(\x0b\x32\x36.google.cloud.workflows.executions.v1.Execution.StatusB\x03\xe0\x41\x03\x12K\n\x06labels\x18\x0b \x03(\x0b\x32;.google.cloud.workflows.executions.v1.Execution.LabelsEntry\x12T\n\x0bstate_error\x18\r \x01(\x0b\x32:.google.cloud.workflows.executions.v1.Execution.StateErrorB\x03\xe0\x41\x03\x1a\xca\x01\n\x11StackTraceElement\x12\x0c\n\x04step\x18\x01 \x01(\t\x12\x0f\n\x07routine\x18\x02 \x01(\t\x12\\\n\x08position\x18\x03 \x01(\x0b\x32J.google.cloud.workflows.executions.v1.Execution.StackTraceElement.Position\x1a\x38\n\x08Position\x12\x0c\n\x04line\x18\x01 \x01(\x03\x12\x0e\n\x06\x63olumn\x18\x02 \x01(\x03\x12\x0e\n\x06length\x18\x03 \x01(\x03\x1a\x61\n\nStackTrace\x12S\n\x08\x65lements\x18\x01 \x03(\x0b\x32\x41.google.cloud.workflows.executions.v1.Execution.StackTraceElement\x1az\n\x05\x45rror\x12\x0f\n\x07payload\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontext\x18\x02 \x01(\t\x12O\n\x0bstack_trace\x18\x03 \x01(\x0b\x32:.google.cloud.workflows.executions.v1.Execution.StackTrace\x1a\x83\x01\n\x06Status\x12R\n\rcurrent_steps\x18\x01 \x03(\x0b\x32;.google.cloud.workflows.executions.v1.Execution.Status.Step\x1a%\n\x04Step\x12\x0f\n\x07routine\x18\x01 \x01(\t\x12\x0c\n\x04step\x18\x02 \x01(\t\x1a\x99\x01\n\nStateError\x12\x0f\n\x07\x64\x65tails\x18\x01 \x01(\t\x12M\n\x04type\x18\x02 \x01(\x0e\x32?.google.cloud.workflows.executions.v1.Execution.StateError.Type\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tKMS_ERROR\x10\x01\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\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x0f\n\x0bUNAVAILABLE\x10\x05\x12\n\n\x06QUEUED\x10\x06\"d\n\x0c\x43\x61llLogLevel\x12\x1e\n\x1a\x43\x41LL_LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rLOG_ALL_CALLS\x10\x01\x12\x13\n\x0fLOG_ERRORS_ONLY\x10\x02\x12\x0c\n\x08LOG_NONE\x10\x03:\x86\x01\xea\x41\x82\x01\n+workflowexecutions.googleapis.com/Execution\x12Sprojects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}\"\xed\x01\n\x15ListExecutionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x46\n\x04view\x18\x04 \x01(\x0e\x32\x33.google.cloud.workflows.executions.v1.ExecutionViewB\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\"v\n\x16ListExecutionsResponse\x12\x43\n\nexecutions\x18\x01 \x03(\x0b\x32/.google.cloud.workflows.executions.v1.Execution\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x9c\x01\n\x16\x43reateExecutionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\x12G\n\texecution\x18\x02 \x01(\x0b\x32/.google.cloud.workflows.executions.v1.ExecutionB\x03\xe0\x41\x02\"\xa0\x01\n\x13GetExecutionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workflowexecutions.googleapis.com/Execution\x12\x46\n\x04view\x18\x02 \x01(\x0e\x32\x33.google.cloud.workflows.executions.v1.ExecutionViewB\x03\xe0\x41\x01\"[\n\x16\x43\x61ncelExecutionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workflowexecutions.googleapis.com/Execution*D\n\rExecutionView\x12\x1e\n\x1a\x45XECUTION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xc3\x07\n\nExecutions\x12\xd8\x01\n\x0eListExecutions\x12;.google.cloud.workflows.executions.v1.ListExecutionsRequest\x1a<.google.cloud.workflows.executions.v1.ListExecutionsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1/{parent=projects/*/locations/*/workflows/*}/executions\x12\xe2\x01\n\x0f\x43reateExecution\x12<.google.cloud.workflows.executions.v1.CreateExecutionRequest\x1a/.google.cloud.workflows.executions.v1.Execution\"`\xda\x41\x10parent,execution\x82\xd3\xe4\x93\x02G\":/v1/{parent=projects/*/locations/*/workflows/*}/executions:\texecution\x12\xc5\x01\n\x0cGetExecution\x12\x39.google.cloud.workflows.executions.v1.GetExecutionRequest\x1a/.google.cloud.workflows.executions.v1.Execution\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/workflows/*/executions/*}\x12\xd5\x01\n\x0f\x43\x61ncelExecution\x12<.google.cloud.workflows.executions.v1.CancelExecutionRequest\x1a/.google.cloud.workflows.executions.v1.Execution\"S\xda\x41\x04name\x82\xd3\xe4\x93\x02\x46\"A/v1/{name=projects/*/locations/*/workflows/*/executions/*}:cancel:\x01*\x1aU\xca\x41!workflowexecutions.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xeb\x01\n(com.google.cloud.workflows.executions.v1B\x0f\x45xecutionsProtoP\x01ZHcloud.google.com/go/workflows/executions/apiv1/executionspb;executionspb\xea\x41\x61\n!workflows.googleapis.com/Workflow\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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb deleted file mode 100644 index 857f5d110040..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/cloud/workflows/executions/v1/executions.rb +++ /dev/null @@ -1,369 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Workflows - module Executions - module V1 - # A running instance of a - # [Workflow](/workflows/docs/reference/rest/v1/projects.locations.workflows). - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the execution. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Marks the beginning of execution. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Marks the end of execution, successful or not. - # @!attribute [r] duration - # @return [::Google::Protobuf::Duration] - # Output only. Measures the duration of the execution. - # @!attribute [r] state - # @return [::Google::Cloud::Workflows::Executions::V1::Execution::State] - # Output only. Current state of the execution. - # @!attribute [rw] argument - # @return [::String] - # Input parameters of the execution represented as a JSON string. - # The size limit is 32KB. - # - # *Note*: If you are using the REST API directly to run your workflow, you - # must escape any JSON string value of `argument`. Example: - # `'{"argument":"{\"firstName\":\"FIRST\",\"lastName\":\"LAST\"}"}'` - # @!attribute [r] result - # @return [::String] - # Output only. Output of the execution represented as a JSON string. The - # value can only be present if the execution's state is `SUCCEEDED`. - # @!attribute [r] error - # @return [::Google::Cloud::Workflows::Executions::V1::Execution::Error] - # Output only. The error which caused the execution to finish prematurely. - # The value is only present if the execution's state is `FAILED` - # or `CANCELLED`. - # @!attribute [r] workflow_revision_id - # @return [::String] - # Output only. Revision of the workflow this execution is using. - # @!attribute [rw] call_log_level - # @return [::Google::Cloud::Workflows::Executions::V1::Execution::CallLogLevel] - # The call logging level associated to this execution. - # @!attribute [r] status - # @return [::Google::Cloud::Workflows::Executions::V1::Execution::Status] - # Output only. Status tracks the current steps and progress data of this - # execution. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with this execution. - # Labels can contain at most 64 entries. Keys and values can be no longer - # than 63 characters and can only contain lowercase letters, numeric - # characters, underscores, and dashes. Label keys must start with a letter. - # International characters are allowed. - # By default, labels are inherited from the workflow but are overridden by - # any labels associated with the execution. - # @!attribute [r] state_error - # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StateError] - # Output only. Error regarding the state of the Execution resource. For - # example, this field will have error details if the execution data is - # unavailable due to revoked KMS key permissions. - class Execution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A single stack element (frame) where an error occurred. - # @!attribute [rw] step - # @return [::String] - # The step the error occurred at. - # @!attribute [rw] routine - # @return [::String] - # The routine where the error occurred. - # @!attribute [rw] position - # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StackTraceElement::Position] - # The source position information of the stack trace element. - class StackTraceElement - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Position contains source position information about the stack trace - # element such as line number, column number and length of the code block - # in bytes. - # @!attribute [rw] line - # @return [::Integer] - # The source code line number the current instruction was generated from. - # @!attribute [rw] column - # @return [::Integer] - # The source code column position (of the line) the current instruction - # was generated from. - # @!attribute [rw] length - # @return [::Integer] - # The number of bytes of source code making up this stack trace element. - class Position - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A collection of stack elements (frames) where an error occurred. - # @!attribute [rw] elements - # @return [::Array<::Google::Cloud::Workflows::Executions::V1::Execution::StackTraceElement>] - # An array of stack elements. - class StackTrace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Error describes why the execution was abnormally terminated. - # @!attribute [rw] payload - # @return [::String] - # Error message and data returned represented as a JSON string. - # @!attribute [rw] context - # @return [::String] - # Human-readable stack trace string. - # @!attribute [rw] stack_trace - # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StackTrace] - # Stack trace with detailed information of where error was generated. - class Error - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the current status of this execution. - # @!attribute [rw] current_steps - # @return [::Array<::Google::Cloud::Workflows::Executions::V1::Execution::Status::Step>] - # A list of currently executing or last executed step names for the - # workflow execution currently running. If the workflow has succeeded or - # failed, this is the last attempted or executed step. Presently, if the - # current step is inside a subworkflow, the list only includes that step. - # In the future, the list will contain items for each step in the call - # stack, starting with the outermost step in the `main` subworkflow, and - # ending with the most deeply nested step. - class Status - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a step of the workflow this execution is running. - # @!attribute [rw] routine - # @return [::String] - # Name of a routine within the workflow. - # @!attribute [rw] step - # @return [::String] - # Name of a step within the routine. - class Step - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes an error related to the current state of the Execution resource. - # @!attribute [rw] details - # @return [::String] - # Provides specifics about the error. - # @!attribute [rw] type - # @return [::Google::Cloud::Workflows::Executions::V1::Execution::StateError::Type] - # The type of this state error. - class StateError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the possible types of a state error. - module Type - # No type specified. - TYPE_UNSPECIFIED = 0 - - # Caused by an issue with KMS. - KMS_ERROR = 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 - - # Describes the current state of the execution. More states might be added - # in the future. - module State - # Invalid state. - STATE_UNSPECIFIED = 0 - - # The execution is in progress. - ACTIVE = 1 - - # The execution finished successfully. - SUCCEEDED = 2 - - # The execution failed with an error. - FAILED = 3 - - # The execution was stopped intentionally. - CANCELLED = 4 - - # Execution data is unavailable. See the `state_error` field. - UNAVAILABLE = 5 - - # Request has been placed in the backlog for processing at a later time. - QUEUED = 6 - end - - # Describes the level of platform logging to apply to calls and call - # responses during workflow executions. - module CallLogLevel - # No call logging level specified. - CALL_LOG_LEVEL_UNSPECIFIED = 0 - - # Log all call steps within workflows, all call returns, and all exceptions - # raised. - LOG_ALL_CALLS = 1 - - # Log only exceptions that are raised from call steps within workflows. - LOG_ERRORS_ONLY = 2 - - # Explicitly log nothing. - LOG_NONE = 3 - end - end - - # Request for the - # [ListExecutions][] - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the workflow for which the executions should be listed. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of executions to return per call. - # Max supported value depends on the selected Execution view: it's 1000 for - # BASIC and 100 for FULL. The default value used if the field is not - # specified is 100, regardless of the selected view. Values greater than - # the max value will be coerced down to it. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListExecutions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListExecutions` must - # match the call that provided the page token. - # - # Note that pagination is applied to dynamic data. The list of executions - # returned can change between page requests. - # @!attribute [rw] view - # @return [::Google::Cloud::Workflows::Executions::V1::ExecutionView] - # Optional. A view defining which fields should be filled in the returned - # executions. The API will default to the BASIC view. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filters applied to the [Executions.ListExecutions] results. - # The following fields are supported for filtering: - # executionID, state, startTime, endTime, duration, workflowRevisionID, - # stepName, and label. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The ordering applied to the [Executions.ListExecutions] results. - # By default the ordering is based on descending start time. - # The following fields are supported for order by: - # executionID, startTime, endTime, duration, state, and workflowRevisionID. - class ListExecutionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the - # {::Google::Cloud::Workflows::Executions::V1::Executions::Client#list_executions ListExecutions} - # method. - # @!attribute [rw] executions - # @return [::Array<::Google::Cloud::Workflows::Executions::V1::Execution>] - # The executions which match the request. - # @!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 ListExecutionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::Executions::V1::Executions::Client#create_execution CreateExecution} - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the workflow for which an execution should be created. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # The latest revision of the workflow will be used. - # @!attribute [rw] execution - # @return [::Google::Cloud::Workflows::Executions::V1::Execution] - # Required. Execution to be created. - class CreateExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::Executions::V1::Executions::Client#get_execution GetExecution} - # method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the execution to be retrieved. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # @!attribute [rw] view - # @return [::Google::Cloud::Workflows::Executions::V1::ExecutionView] - # Optional. A view defining which fields should be filled in the returned - # execution. The API will default to the FULL view. - class GetExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::Executions::V1::Executions::Client#cancel_execution CancelExecution} - # method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the execution to be cancelled. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - class CancelExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines possible views for execution resource. - module ExecutionView - # The default / unset value. - EXECUTION_VIEW_UNSPECIFIED = 0 - - # Includes only basic metadata about the execution. - # The following fields are returned: name, start_time, end_time, duration, - # state, and workflow_revision_id. - BASIC = 1 - - # Includes all data. - FULL = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/Gemfile deleted file mode 100644 index 7daeaea34a37..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1", path: "../" -else - gem "google-cloud-workflows-executions-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-workflows-executions-v1/snippets/executions/cancel_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb deleted file mode 100644 index 62751576d96a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/cancel_execution.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workflowexecutions_v1_generated_Executions_CancelExecution_sync] -require "google/cloud/workflows/executions/v1" - -## -# Snippet for the cancel_execution call in the Executions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::Executions::V1::Executions::Client#cancel_execution. -# -def cancel_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new - - # Call the cancel_execution method. - result = client.cancel_execution request - - # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. - p result -end -# [END workflowexecutions_v1_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb deleted file mode 100644 index e18a26220cc7..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/create_execution.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workflowexecutions_v1_generated_Executions_CreateExecution_sync] -require "google/cloud/workflows/executions/v1" - -## -# Snippet for the create_execution call in the Executions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::Executions::V1::Executions::Client#create_execution. -# -def create_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new - - # Call the create_execution method. - result = client.create_execution request - - # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. - p result -end -# [END workflowexecutions_v1_generated_Executions_CreateExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb deleted file mode 100644 index 606f5d673467..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/get_execution.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workflowexecutions_v1_generated_Executions_GetExecution_sync] -require "google/cloud/workflows/executions/v1" - -## -# Snippet for the get_execution call in the Executions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::Executions::V1::Executions::Client#get_execution. -# -def get_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new - - # Call the get_execution method. - result = client.get_execution request - - # The returned object is of type Google::Cloud::Workflows::Executions::V1::Execution. - p result -end -# [END workflowexecutions_v1_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb deleted file mode 100644 index 71b5474a1300..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/executions/list_executions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workflowexecutions_v1_generated_Executions_ListExecutions_sync] -require "google/cloud/workflows/executions/v1" - -## -# Snippet for the list_executions call in the Executions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::Executions::V1::Executions::Client#list_executions. -# -def list_executions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::Executions::V1::Executions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new - - # Call the list_executions method. - result = client.list_executions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Workflows::Executions::V1::Execution. - p item - end -end -# [END workflowexecutions_v1_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/snippet_metadata_google.cloud.workflows.executions.v1.json b/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/snippet_metadata_google.cloud.workflows.executions.v1.json deleted file mode 100644 index 8484d092b98b..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/snippets/snippet_metadata_google.cloud.workflows.executions.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-workflows-executions-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.workflows.executions.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "workflowexecutions_v1_generated_Executions_ListExecutions_sync", - "title": "Snippet for the list_executions call in the Executions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1::Executions::Client#list_executions.", - "file": "executions/list_executions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_executions", - "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client#list_executions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse", - "client": { - "short_name": "Executions::Client", - "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client" - }, - "method": { - "short_name": "ListExecutions", - "full_name": "google.cloud.workflows.executions.v1.Executions.ListExecutions", - "service": { - "short_name": "Executions", - "full_name": "google.cloud.workflows.executions.v1.Executions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflowexecutions_v1_generated_Executions_CreateExecution_sync", - "title": "Snippet for the create_execution call in the Executions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1::Executions::Client#create_execution.", - "file": "executions/create_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_execution", - "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client#create_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::Executions::V1::Execution", - "client": { - "short_name": "Executions::Client", - "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client" - }, - "method": { - "short_name": "CreateExecution", - "full_name": "google.cloud.workflows.executions.v1.Executions.CreateExecution", - "service": { - "short_name": "Executions", - "full_name": "google.cloud.workflows.executions.v1.Executions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflowexecutions_v1_generated_Executions_GetExecution_sync", - "title": "Snippet for the get_execution call in the Executions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1::Executions::Client#get_execution.", - "file": "executions/get_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_execution", - "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client#get_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::Executions::V1::Execution", - "client": { - "short_name": "Executions::Client", - "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client" - }, - "method": { - "short_name": "GetExecution", - "full_name": "google.cloud.workflows.executions.v1.Executions.GetExecution", - "service": { - "short_name": "Executions", - "full_name": "google.cloud.workflows.executions.v1.Executions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflowexecutions_v1_generated_Executions_CancelExecution_sync", - "title": "Snippet for the cancel_execution call in the Executions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1::Executions::Client#cancel_execution.", - "file": "executions/cancel_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_execution", - "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client#cancel_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::Executions::V1::Execution", - "client": { - "short_name": "Executions::Client", - "full_name": "::Google::Cloud::Workflows::Executions::V1::Executions::Client" - }, - "method": { - "short_name": "CancelExecution", - "full_name": "google.cloud.workflows.executions.v1.Executions.CancelExecution", - "service": { - "short_name": "Executions", - "full_name": "google.cloud.workflows.executions.v1.Executions" - } - } - }, - "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-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_paths_test.rb deleted file mode 100644 index 72a7af7dcf6e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_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/workflows/executions/v1/executions" - -class ::Google::Cloud::Workflows::Executions::V1::Executions::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_execution_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.execution_path project: "value0", location: "value1", workflow: "value2", execution: "value3" - assert_equal "projects/value0/locations/value1/workflows/value2/executions/value3", path - end - end - - def test_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::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.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-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb deleted file mode 100644 index 999aa8c8b372..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_rest_test.rb +++ /dev/null @@ -1,322 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "gapic/rest" -require "google/cloud/workflows/executions/v1/executions_pb" -require "google/cloud/workflows/executions/v1/executions/rest" - - -class ::Google::Cloud::Workflows::Executions::V1::Executions::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_executions - # Create test objects. - client_result = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse.new - http_response = OpenStruct.new 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 = :EXECUTION_VIEW_UNSPECIFIED - filter = "hello world" - order_by = "hello world" - - list_executions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.stub :transcode_list_executions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_executions_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_executions parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_executions ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_executions(::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_executions_client_stub.call_count - end - end - end - - def test_create_execution - # Create test objects. - client_result = ::Google::Cloud::Workflows::Executions::V1::Execution.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - execution = {} - - create_execution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.stub :transcode_create_execution_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_execution_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_execution({ parent: parent, execution: execution }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_execution parent: parent, execution: execution do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_execution ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new(parent: parent, execution: execution) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_execution({ parent: parent, execution: execution }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_execution(::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new(parent: parent, execution: execution), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_execution_client_stub.call_count - end - end - end - - def test_get_execution - # Create test objects. - client_result = ::Google::Cloud::Workflows::Executions::V1::Execution.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - view = :EXECUTION_VIEW_UNSPECIFIED - - get_execution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.stub :transcode_get_execution_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_execution_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_execution({ name: name, view: view }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_execution name: name, view: view do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_execution ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new(name: name, view: view) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_execution({ name: name, view: view }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_execution(::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.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_execution_client_stub.call_count - end - end - end - - def test_cancel_execution - # Create test objects. - client_result = ::Google::Cloud::Workflows::Executions::V1::Execution.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_execution_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::ServiceStub.stub :transcode_cancel_execution_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_execution_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1::Executions::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_execution({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_execution name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_execution ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_execution({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_execution(::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_execution_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::Workflows::Executions::V1::Executions::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::Workflows::Executions::V1::Executions::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb deleted file mode 100644 index ea4afdcca877..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/test/google/cloud/workflows/executions/v1/executions_test.rb +++ /dev/null @@ -1,355 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workflows/executions/v1/executions_pb" -require "google/cloud/workflows/executions/v1/executions" - -class ::Google::Cloud::Workflows::Executions::V1::Executions::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_executions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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 = :EXECUTION_VIEW_UNSPECIFIED - filter = "hello world" - order_by = "hello world" - - list_executions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_executions, name - assert_kind_of ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :EXECUTION_VIEW_UNSPECIFIED, request["view"] - assert_equal "hello world", request["filter"] - assert_equal "hello world", request["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_executions_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_executions parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_executions ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_executions(::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view, 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_executions_client_stub.call_rpc_count - end - end - - def test_create_execution - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::Executions::V1::Execution.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - execution = {} - - create_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_execution, name - assert_kind_of ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::Executions::V1::Execution), request["execution"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_execution_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_execution({ parent: parent, execution: execution }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_execution parent: parent, execution: execution do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_execution ::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new(parent: parent, execution: execution) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_execution({ parent: parent, execution: execution }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_execution(::Google::Cloud::Workflows::Executions::V1::CreateExecutionRequest.new(parent: parent, execution: execution), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_execution_client_stub.call_rpc_count - end - end - - def test_get_execution - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::Executions::V1::Execution.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 = :EXECUTION_VIEW_UNSPECIFIED - - get_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_execution, name - assert_kind_of ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest, request - assert_equal "hello world", request["name"] - assert_equal :EXECUTION_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_execution_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_execution({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_execution name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_execution ::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_execution({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_execution(::Google::Cloud::Workflows::Executions::V1::GetExecutionRequest.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_execution_client_stub.call_rpc_count - end - end - - def test_cancel_execution - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::Executions::V1::Execution.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_execution, name - assert_kind_of ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_execution_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_execution({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_execution name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_execution ::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_execution({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_execution(::Google::Cloud::Workflows::Executions::V1::CancelExecutionRequest.new(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_execution_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::Workflows::Executions::V1::Executions::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::Workflows::Executions::V1::Executions::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::Workflows::Executions::V1::Executions::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Workflows::Executions::V1::Executions::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb b/owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.repo-metadata.json deleted file mode 100644 index e81c837b52ed..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "workflowexecutions.googleapis.com", - "api_shortname": "workflowexecutions", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1beta/latest", - "distribution_name": "google-cloud-workflows-executions-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "workflowexecutions", - "name_pretty": "Workflows Executions V1beta API", - "product_documentation": "https://cloud.google.com/workflows/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-executions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details.", - "ruby-cloud-env-prefix": "WORKFLOWS", - "ruby-cloud-product-url": "https://cloud.google.com/workflows/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.rubocop.yml deleted file mode 100644 index 307c124f8568..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workflows-executions-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-workflows-executions-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.toys.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/.yardopts b/owl-bot-staging/google-cloud-workflows-executions-v1beta/.yardopts deleted file mode 100644 index 59f0a9e09511..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Workflows Executions 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-workflows-executions-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows-executions-v1beta/AUTHENTICATION.md deleted file mode 100644 index 4d061343a486..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workflows-executions-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-workflows-executions-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/workflows/executions/v1beta" - -client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workflows/executions/v1beta" - -::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::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-workflows-executions-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/workflows/executions/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::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-workflows-executions-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows-executions-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile b/owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-workflows-executions-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/README.md b/owl-bot-staging/google-cloud-workflows-executions-v1beta/README.md deleted file mode 100644 index 006a8fe26b14..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Workflows Executions V1beta API - -Manages user-provided workflows. - -Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Workflows Executions V1beta API. Most users should consider using -the main client gem, -[google-cloud-workflows](https://rubygems.org/gems/google-cloud-workflows). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-workflows-executions-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/workflowexecutions.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/workflows/executions/v1beta" - -client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new -request = ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new # (request fields as keyword arguments...) -response = client.list_executions request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/workflows/) -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/workflows/executions/v1beta" -require "logger" - -client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workflows`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workflows-executions-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-workflows`. -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-workflows-executions-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-workflows-executions-v1beta/Rakefile b/owl-bot-staging/google-cloud-workflows-executions-v1beta/Rakefile deleted file mode 100644 index fa9f3f6dac59..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WORKFLOWS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WORKFLOWS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/workflows/executions/v1beta/executions/credentials" - ::Google::Cloud::Workflows::Executions::V1beta::Executions::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WORKFLOWS_PROJECT"] = project - ENV["WORKFLOWS_TEST_PROJECT"] = project - ENV["WORKFLOWS_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-workflows-executions-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-workflows-executions-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-workflows-executions-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-workflows-executions-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workflows-executions-v1beta" - header "google-cloud-workflows-executions-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workflows-executions-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workflows-executions-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-workflows-executions-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-workflows-executions-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-workflows-executions-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-workflows-executions-v1beta/gapic_metadata.json deleted file mode 100644 index 48333bd150d0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/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.workflows.executions.v1beta", - "libraryPackage": "::Google::Cloud::Workflows::Executions::V1beta", - "services": { - "Executions": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client", - "rpcs": { - "ListExecutions": { - "methods": [ - "list_executions" - ] - }, - "CreateExecution": { - "methods": [ - "create_execution" - ] - }, - "GetExecution": { - "methods": [ - "get_execution" - ] - }, - "CancelExecution": { - "methods": [ - "cancel_execution" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/google-cloud-workflows-executions-v1beta.gemspec b/owl-bot-staging/google-cloud-workflows-executions-v1beta/google-cloud-workflows-executions-v1beta.gemspec deleted file mode 100644 index 24f03edc36f6..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/google-cloud-workflows-executions-v1beta.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workflows/executions/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workflows-executions-v1beta" - gem.version = Google::Cloud::Workflows::Executions::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-executions-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details." - gem.summary = "Manages user-provided workflows." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-v1beta.rb deleted file mode 100644 index 2e0636bb1b59..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google-cloud-workflows-executions-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/workflows/executions/v1beta" diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.rb deleted file mode 100644 index f86ef8bc398c..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta.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/workflows/executions/v1beta/executions" -require "google/cloud/workflows/executions/v1beta/version" - -module Google - module Cloud - module Workflows - module Executions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/workflows/executions/v1beta" - # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - # - module V1beta - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/workflows/executions/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb deleted file mode 100644 index 10f6adbe5ec1..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/workflows/executions/v1beta/version" - -require "google/cloud/workflows/executions/v1beta/executions/credentials" -require "google/cloud/workflows/executions/v1beta/executions/paths" -require "google/cloud/workflows/executions/v1beta/executions/client" - -module Google - module Cloud - module Workflows - module Executions - module V1beta - ## - # Executions is used to start and manage running instances of - # [Workflows][google.cloud.workflows.v1beta.Workflow] called executions. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/workflows/executions/v1beta/executions" - # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - # - module Executions - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "executions", "helpers.rb" -require "google/cloud/workflows/executions/v1beta/executions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb deleted file mode 100644 index 2bfac81e7856..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/client.rb +++ /dev/null @@ -1,789 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/workflows/executions/v1beta/executions_pb" - -module Google - module Cloud - module Workflows - module Executions - module V1beta - module Executions - ## - # Client for the Executions service. - # - # Executions is used to start and manage running instances of - # [Workflows][google.cloud.workflows.v1beta.Workflow] called executions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflowexecutions.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :executions_stub - - ## - # Configure the Executions Client class. - # - # See {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Executions clients - # ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workflows", "Executions", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Executions Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @executions_stub.universe_domain - end - - ## - # Create a new Executions client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Executions 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/workflows/executions/v1beta/executions_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 - - @executions_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Workflows::Executions::V1beta::Executions::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 - ) - - @executions_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 - @executions_stub.logger - end - - # Service calls - - ## - # Returns a list of executions which belong to the workflow with - # the given name. The method returns executions of all workflow - # revisions. Returned executions are ordered by their start time (newest - # first). - # - # @overload list_executions(request, options = nil) - # Pass arguments to `list_executions` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_executions(parent: nil, page_size: nil, page_token: nil, view: nil) - # Pass arguments to `list_executions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the workflow for which the executions should be listed. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @param page_size [::Integer] - # Maximum number of executions to return per call. - # Max supported value depends on the selected Execution view: it's 10000 for - # BASIC and 100 for FULL. The default value used if the field is not - # specified is 100, regardless of the selected view. Values greater than - # the max value will be coerced down to it. - # @param page_token [::String] - # A page token, received from a previous `ListExecutions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListExecutions` must - # match the call that provided the page token. - # @param view [::Google::Cloud::Workflows::Executions::V1beta::ExecutionView] - # Optional. A view defining which fields should be filled in the returned executions. - # The API will default to the BASIC view. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1beta::Execution>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::Executions::V1beta::Execution>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new - # - # # Call the list_executions method. - # result = client.list_executions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workflows::Executions::V1beta::Execution. - # p item - # end - # - def list_executions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_executions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::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_executions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_executions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.call_rpc :list_executions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @executions_stub, :list_executions, request, response, 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 execution using the latest revision of the given workflow. - # - # @overload create_execution(request, options = nil) - # Pass arguments to `create_execution` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_execution(parent: nil, execution: nil) - # Pass arguments to `create_execution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. Name of the workflow for which an execution should be created. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # The latest revision of the workflow will be used. - # @param execution [::Google::Cloud::Workflows::Executions::V1beta::Execution, ::Hash] - # Required. Execution to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workflows::Executions::V1beta::Execution] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest.new - # - # # Call the create_execution method. - # result = client.create_execution request - # - # # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. - # p result - # - def create_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_execution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::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_execution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.call_rpc :create_execution, request, 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 an execution of the given name. - # - # @overload get_execution(request, options = nil) - # Pass arguments to `get_execution` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_execution(name: nil, view: nil) - # Pass arguments to `get_execution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the execution to be retrieved. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # @param view [::Google::Cloud::Workflows::Executions::V1beta::ExecutionView] - # Optional. A view defining which fields should be filled in the returned execution. - # The API will default to the FULL view. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workflows::Executions::V1beta::Execution] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest.new - # - # # Call the get_execution method. - # result = client.get_execution request - # - # # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. - # p result - # - def get_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_execution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::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_execution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.call_rpc :get_execution, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Cancels an execution of the given name. - # - # @overload cancel_execution(request, options = nil) - # Pass arguments to `cancel_execution` via a request object, either of type - # {::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_execution(name: nil) - # Pass arguments to `cancel_execution` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the execution to be cancelled. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workflows::Executions::V1beta::Execution] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/executions/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest.new - # - # # Call the cancel_execution method. - # result = client.cancel_execution request - # - # # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. - # p result - # - def cancel_execution request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest - - # Converts hash and nil to 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_execution.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workflows::Executions::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_execution.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_execution.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @executions_stub.call_rpc :cancel_execution, request, 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 Executions API. - # - # This class represents the configuration for Executions, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_executions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_executions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_executions.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Workflows::Executions::V1beta::Executions::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflowexecutions.googleapis.com" - - config_attr :endpoint, nil, ::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 Executions API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_executions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_executions - ## - # RPC-specific configuration for `create_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :create_execution - ## - # RPC-specific configuration for `get_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :get_execution - ## - # RPC-specific configuration for `cancel_execution` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_execution - - # @private - def initialize parent_rpcs = nil - list_executions_config = parent_rpcs.list_executions if parent_rpcs.respond_to? :list_executions - @list_executions = ::Gapic::Config::Method.new list_executions_config - create_execution_config = parent_rpcs.create_execution if parent_rpcs.respond_to? :create_execution - @create_execution = ::Gapic::Config::Method.new create_execution_config - get_execution_config = parent_rpcs.get_execution if parent_rpcs.respond_to? :get_execution - @get_execution = ::Gapic::Config::Method.new get_execution_config - cancel_execution_config = parent_rpcs.cancel_execution if parent_rpcs.respond_to? :cancel_execution - @cancel_execution = ::Gapic::Config::Method.new cancel_execution_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/credentials.rb deleted file mode 100644 index 82a81fac37cc..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/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 Workflows - module Executions - module V1beta - module Executions - # Credentials for the Executions API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "WORKFLOWS_CREDENTIALS", - "WORKFLOWS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "WORKFLOWS_CREDENTIALS_JSON", - "WORKFLOWS_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-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb deleted file mode 100644 index 91d5836ff754..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions/paths.rb +++ /dev/null @@ -1,75 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Workflows - module Executions - module V1beta - module Executions - # Path helper methods for the Executions API. - module Paths - ## - # Create a fully-qualified Execution resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}` - # - # @param project [String] - # @param location [String] - # @param workflow [String] - # @param execution [String] - # - # @return [::String] - def execution_path project:, location:, workflow:, execution: - 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}/executions/#{execution}" - end - - ## - # Create a fully-qualified Workflow 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 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-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb deleted file mode 100644 index 1367aaf81255..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/lib/google/cloud/workflows/executions/v1beta/executions_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/workflows/executions/v1beta/executions.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n9google/cloud/workflows/executions/v1beta/executions.proto\x12(google.cloud.workflows.executions.v1beta\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf8\x04\n\tExecution\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x33\n\nstart_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x31\n\x08\x65nd_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12M\n\x05state\x18\x04 \x01(\x0e\x32\x39.google.cloud.workflows.executions.v1beta.Execution.StateB\x03\xe0\x41\x03\x12\x10\n\x08\x61rgument\x18\x05 \x01(\t\x12\x13\n\x06result\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12M\n\x05\x65rror\x18\x07 \x01(\x0b\x32\x39.google.cloud.workflows.executions.v1beta.Execution.ErrorB\x03\xe0\x41\x03\x12!\n\x14workflow_revision_id\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a)\n\x05\x45rror\x12\x0f\n\x07payload\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontext\x18\x02 \x01(\t\"T\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\r\n\tSUCCEEDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\r\n\tCANCELLED\x10\x04:\x86\x01\xea\x41\x82\x01\n+workflowexecutions.googleapis.com/Execution\x12Sprojects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}\"\xc5\x01\n\x15ListExecutionsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12J\n\x04view\x18\x04 \x01(\x0e\x32\x37.google.cloud.workflows.executions.v1beta.ExecutionViewB\x03\xe0\x41\x01\"z\n\x16ListExecutionsResponse\x12G\n\nexecutions\x18\x01 \x03(\x0b\x32\x33.google.cloud.workflows.executions.v1beta.Execution\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x16\x43reateExecutionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\x12K\n\texecution\x18\x02 \x01(\x0b\x32\x33.google.cloud.workflows.executions.v1beta.ExecutionB\x03\xe0\x41\x02\"\xa4\x01\n\x13GetExecutionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workflowexecutions.googleapis.com/Execution\x12J\n\x04view\x18\x02 \x01(\x0e\x32\x37.google.cloud.workflows.executions.v1beta.ExecutionViewB\x03\xe0\x41\x01\"[\n\x16\x43\x61ncelExecutionRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+workflowexecutions.googleapis.com/Execution*D\n\rExecutionView\x12\x1e\n\x1a\x45XECUTION_VIEW_UNSPECIFIED\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\x08\n\x04\x46ULL\x10\x02\x32\xf3\x07\n\nExecutions\x12\xe4\x01\n\x0eListExecutions\x12?.google.cloud.workflows.executions.v1beta.ListExecutionsRequest\x1a@.google.cloud.workflows.executions.v1beta.ListExecutionsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1beta/{parent=projects/*/locations/*/workflows/*}/executions\x12\xee\x01\n\x0f\x43reateExecution\x12@.google.cloud.workflows.executions.v1beta.CreateExecutionRequest\x1a\x33.google.cloud.workflows.executions.v1beta.Execution\"d\xda\x41\x10parent,execution\x82\xd3\xe4\x93\x02K\">/v1beta/{parent=projects/*/locations/*/workflows/*}/executions:\texecution\x12\xd1\x01\n\x0cGetExecution\x12=.google.cloud.workflows.executions.v1beta.GetExecutionRequest\x1a\x33.google.cloud.workflows.executions.v1beta.Execution\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}\x12\xe1\x01\n\x0f\x43\x61ncelExecution\x12@.google.cloud.workflows.executions.v1beta.CancelExecutionRequest\x1a\x33.google.cloud.workflows.executions.v1beta.Execution\"W\xda\x41\x04name\x82\xd3\xe4\x93\x02J\"E/v1beta/{name=projects/*/locations/*/workflows/*/executions/*}:cancel:\x01*\x1aU\xca\x41!workflowexecutions.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xf3\x01\n,com.google.cloud.workflows.executions.v1betaB\x0f\x45xecutionsProtoP\x01ZLcloud.google.com/go/workflows/executions/apiv1beta/executionspb;executionspb\xea\x41\x61\n!workflows.googleapis.com/Workflow\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. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb deleted file mode 100644 index 155d545071b2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/cloud/workflows/executions/v1beta/executions.rb +++ /dev/null @@ -1,200 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Workflows - module Executions - module V1beta - # A running instance of a [Workflow][google.cloud.workflows.v1beta.Workflow]. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the execution. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Marks the beginning of execution. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Marks the end of execution, successful or not. - # @!attribute [r] state - # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution::State] - # Output only. Current state of the execution. - # @!attribute [rw] argument - # @return [::String] - # Input parameters of the execution represented as a JSON string. - # The size limit is 32KB. - # @!attribute [r] result - # @return [::String] - # Output only. Output of the execution represented as a JSON string. The - # value can only be present if the execution's state is `SUCCEEDED`. - # @!attribute [r] error - # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution::Error] - # Output only. The error which caused the execution to finish prematurely. - # The value is only present if the execution's state is `FAILED` - # or `CANCELLED`. - # @!attribute [r] workflow_revision_id - # @return [::String] - # Output only. Revision of the workflow this execution is using. - class Execution - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Error describes why the execution was abnormally terminated. - # @!attribute [rw] payload - # @return [::String] - # Error payload returned by the execution, represented as a JSON string. - # @!attribute [rw] context - # @return [::String] - # Human readable error context, helpful for debugging purposes. - class Error - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the current state of the execution. More states may be added - # in the future. - module State - # Invalid state. - STATE_UNSPECIFIED = 0 - - # The execution is in progress. - ACTIVE = 1 - - # The execution finished successfully. - SUCCEEDED = 2 - - # The execution failed with an error. - FAILED = 3 - - # The execution was stopped intentionally. - CANCELLED = 4 - end - end - - # Request for the - # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions ListExecutions} - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the workflow for which the executions should be listed. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of executions to return per call. - # Max supported value depends on the selected Execution view: it's 10000 for - # BASIC and 100 for FULL. The default value used if the field is not - # specified is 100, regardless of the selected view. Values greater than - # the max value will be coerced down to it. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListExecutions` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListExecutions` must - # match the call that provided the page token. - # @!attribute [rw] view - # @return [::Google::Cloud::Workflows::Executions::V1beta::ExecutionView] - # Optional. A view defining which fields should be filled in the returned executions. - # The API will default to the BASIC view. - class ListExecutionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the - # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions ListExecutions} - # method. - # @!attribute [rw] executions - # @return [::Array<::Google::Cloud::Workflows::Executions::V1beta::Execution>] - # The executions which match the request. - # @!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 ListExecutionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#create_execution CreateExecution} - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. Name of the workflow for which an execution should be created. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # The latest revision of the workflow will be used. - # @!attribute [rw] execution - # @return [::Google::Cloud::Workflows::Executions::V1beta::Execution] - # Required. Execution to be created. - class CreateExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#get_execution GetExecution} - # method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the execution to be retrieved. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - # @!attribute [rw] view - # @return [::Google::Cloud::Workflows::Executions::V1beta::ExecutionView] - # Optional. A view defining which fields should be filled in the returned execution. - # The API will default to the FULL view. - class GetExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#cancel_execution CancelExecution} - # method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the execution to be cancelled. - # Format: - # projects/\\{project}/locations/\\{location}/workflows/\\{workflow}/executions/\\{execution} - class CancelExecutionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines possible views for execution resource. - module ExecutionView - # The default / unset value. - EXECUTION_VIEW_UNSPECIFIED = 0 - - # Includes only basic metadata about the execution. - # Following fields are returned: name, start_time, end_time, state - # and workflow_revision_id. - BASIC = 1 - - # Includes all data. - FULL = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/Gemfile deleted file mode 100644 index 16f945ec033e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-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-workflows-executions-v1beta", path: "../" -else - gem "google-cloud-workflows-executions-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-workflows-executions-v1beta/snippets/executions/cancel_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb deleted file mode 100644 index 8f7f3934284c..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/cancel_execution.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workflowexecutions_v1beta_generated_Executions_CancelExecution_sync] -require "google/cloud/workflows/executions/v1beta" - -## -# Snippet for the cancel_execution call in the Executions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::Executions::V1beta::Executions::Client#cancel_execution. -# -def cancel_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest.new - - # Call the cancel_execution method. - result = client.cancel_execution request - - # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. - p result -end -# [END workflowexecutions_v1beta_generated_Executions_CancelExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb deleted file mode 100644 index 926c4489f51d..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/create_execution.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workflowexecutions_v1beta_generated_Executions_CreateExecution_sync] -require "google/cloud/workflows/executions/v1beta" - -## -# Snippet for the create_execution call in the Executions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::Executions::V1beta::Executions::Client#create_execution. -# -def create_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest.new - - # Call the create_execution method. - result = client.create_execution request - - # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. - p result -end -# [END workflowexecutions_v1beta_generated_Executions_CreateExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb deleted file mode 100644 index 58e0a552a8ab..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/get_execution.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workflowexecutions_v1beta_generated_Executions_GetExecution_sync] -require "google/cloud/workflows/executions/v1beta" - -## -# Snippet for the get_execution call in the Executions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::Executions::V1beta::Executions::Client#get_execution. -# -def get_execution - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest.new - - # Call the get_execution method. - result = client.get_execution request - - # The returned object is of type Google::Cloud::Workflows::Executions::V1beta::Execution. - p result -end -# [END workflowexecutions_v1beta_generated_Executions_GetExecution_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb deleted file mode 100644 index a8f00e5f1390..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/executions/list_executions.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workflowexecutions_v1beta_generated_Executions_ListExecutions_sync] -require "google/cloud/workflows/executions/v1beta" - -## -# Snippet for the list_executions call in the Executions service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions. -# -def list_executions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new - - # Call the list_executions method. - result = client.list_executions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Workflows::Executions::V1beta::Execution. - p item - end -end -# [END workflowexecutions_v1beta_generated_Executions_ListExecutions_sync] diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/snippet_metadata_google.cloud.workflows.executions.v1beta.json b/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/snippet_metadata_google.cloud.workflows.executions.v1beta.json deleted file mode 100644 index 598ce53245c5..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/snippets/snippet_metadata_google.cloud.workflows.executions.v1beta.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-workflows-executions-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.workflows.executions.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "workflowexecutions_v1beta_generated_Executions_ListExecutions_sync", - "title": "Snippet for the list_executions call in the Executions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions.", - "file": "executions/list_executions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_executions", - "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#list_executions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsResponse", - "client": { - "short_name": "Executions::Client", - "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client" - }, - "method": { - "short_name": "ListExecutions", - "full_name": "google.cloud.workflows.executions.v1beta.Executions.ListExecutions", - "service": { - "short_name": "Executions", - "full_name": "google.cloud.workflows.executions.v1beta.Executions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflowexecutions_v1beta_generated_Executions_CreateExecution_sync", - "title": "Snippet for the create_execution call in the Executions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1beta::Executions::Client#create_execution.", - "file": "executions/create_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_execution", - "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#create_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::Executions::V1beta::Execution", - "client": { - "short_name": "Executions::Client", - "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client" - }, - "method": { - "short_name": "CreateExecution", - "full_name": "google.cloud.workflows.executions.v1beta.Executions.CreateExecution", - "service": { - "short_name": "Executions", - "full_name": "google.cloud.workflows.executions.v1beta.Executions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflowexecutions_v1beta_generated_Executions_GetExecution_sync", - "title": "Snippet for the get_execution call in the Executions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1beta::Executions::Client#get_execution.", - "file": "executions/get_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_execution", - "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#get_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::Executions::V1beta::Execution", - "client": { - "short_name": "Executions::Client", - "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client" - }, - "method": { - "short_name": "GetExecution", - "full_name": "google.cloud.workflows.executions.v1beta.Executions.GetExecution", - "service": { - "short_name": "Executions", - "full_name": "google.cloud.workflows.executions.v1beta.Executions" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflowexecutions_v1beta_generated_Executions_CancelExecution_sync", - "title": "Snippet for the cancel_execution call in the Executions service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::Executions::V1beta::Executions::Client#cancel_execution.", - "file": "executions/cancel_execution.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_execution", - "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client#cancel_execution", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::Executions::V1beta::Execution", - "client": { - "short_name": "Executions::Client", - "full_name": "::Google::Cloud::Workflows::Executions::V1beta::Executions::Client" - }, - "method": { - "short_name": "CancelExecution", - "full_name": "google.cloud.workflows.executions.v1beta.Executions.CancelExecution", - "service": { - "short_name": "Executions", - "full_name": "google.cloud.workflows.executions.v1beta.Executions" - } - } - }, - "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-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_paths_test.rb deleted file mode 100644 index d23ec98d8085..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_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/workflows/executions/v1beta/executions" - -class ::Google::Cloud::Workflows::Executions::V1beta::Executions::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_execution_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.execution_path project: "value0", location: "value1", workflow: "value2", execution: "value3" - assert_equal "projects/value0/locations/value1/workflows/value2/executions/value3", path - end - end - - def test_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::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.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-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb deleted file mode 100644 index c293feaf68bc..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/google/cloud/workflows/executions/v1beta/executions_test.rb +++ /dev/null @@ -1,351 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workflows/executions/v1beta/executions_pb" -require "google/cloud/workflows/executions/v1beta/executions" - -class ::Google::Cloud::Workflows::Executions::V1beta::Executions::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_executions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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 = :EXECUTION_VIEW_UNSPECIFIED - - list_executions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_executions, name - assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal :EXECUTION_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_executions_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_executions parent: parent, page_size: page_size, page_token: page_token, view: view do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_executions ::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_executions({ parent: parent, page_size: page_size, page_token: page_token, view: view }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_executions(::Google::Cloud::Workflows::Executions::V1beta::ListExecutionsRequest.new(parent: parent, page_size: page_size, page_token: page_token, view: view), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_executions_client_stub.call_rpc_count - end - end - - def test_create_execution - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::Executions::V1beta::Execution.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - execution = {} - - create_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_execution, name - assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::Executions::V1beta::Execution), request["execution"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_execution_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_execution({ parent: parent, execution: execution }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_execution parent: parent, execution: execution do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_execution ::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest.new(parent: parent, execution: execution) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_execution({ parent: parent, execution: execution }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_execution(::Google::Cloud::Workflows::Executions::V1beta::CreateExecutionRequest.new(parent: parent, execution: execution), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_execution_client_stub.call_rpc_count - end - end - - def test_get_execution - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::Executions::V1beta::Execution.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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 = :EXECUTION_VIEW_UNSPECIFIED - - get_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_execution, name - assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest, request - assert_equal "hello world", request["name"] - assert_equal :EXECUTION_VIEW_UNSPECIFIED, request["view"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_execution_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_execution({ name: name, view: view }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_execution name: name, view: view do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_execution ::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest.new(name: name, view: view) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_execution({ name: name, view: view }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_execution(::Google::Cloud::Workflows::Executions::V1beta::GetExecutionRequest.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_execution_client_stub.call_rpc_count - end - end - - def test_cancel_execution - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::Executions::V1beta::Execution.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_execution_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_execution, name - assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_execution_client_stub do - # Create client - client = ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_execution({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_execution name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_execution ::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_execution({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_execution(::Google::Cloud::Workflows::Executions::V1beta::CancelExecutionRequest.new(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_execution_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::Workflows::Executions::V1beta::Executions::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::Workflows::Executions::V1beta::Executions::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::Workflows::Executions::V1beta::Executions::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Workflows::Executions::V1beta::Executions::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-executions-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1/.gitignore b/owl-bot-staging/google-cloud-workflows-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows-v1/.repo-metadata.json deleted file mode 100644 index 69f7509959da..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "workflows.googleapis.com", - "api_shortname": "workflows", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest", - "distribution_name": "google-cloud-workflows-v1", - "is_cloud": true, - "language": "ruby", - "name": "workflows", - "name_pretty": "Workflows V1 API", - "product_documentation": "https://cloud.google.com/workflows/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details.", - "ruby-cloud-env-prefix": "WORKFLOWS", - "ruby-cloud-product-url": "https://cloud.google.com/workflows/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workflows-v1/.rubocop.yml b/owl-bot-staging/google-cloud-workflows-v1/.rubocop.yml deleted file mode 100644 index f3347d525c00..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workflows-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-workflows-v1.rb" diff --git a/owl-bot-staging/google-cloud-workflows-v1/.toys.rb b/owl-bot-staging/google-cloud-workflows-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/.yardopts b/owl-bot-staging/google-cloud-workflows-v1/.yardopts deleted file mode 100644 index 3d801a2a7c84..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Workflows 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-workflows-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows-v1/AUTHENTICATION.md deleted file mode 100644 index e217594f764c..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workflows-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-workflows-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/workflows/v1" - -client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workflows/v1" - -::Google::Cloud::Workflows::V1::Workflows::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Workflows::V1::Workflows::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-workflows-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/workflows/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Workflows::V1::Workflows::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-workflows-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workflows-v1/Gemfile b/owl-bot-staging/google-cloud-workflows-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows-v1/LICENSE.md b/owl-bot-staging/google-cloud-workflows-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/README.md b/owl-bot-staging/google-cloud-workflows-v1/README.md deleted file mode 100644 index d7ab36838d46..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Workflows V1 API - -Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API. - -Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Workflows V1 API. Most users should consider using -the main client gem, -[google-cloud-workflows](https://rubygems.org/gems/google-cloud-workflows). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-workflows-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/workflows.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/workflows/v1" - -client = ::Google::Cloud::Workflows::V1::Workflows::Client.new -request = ::Google::Cloud::Workflows::V1::ListWorkflowsRequest.new # (request fields as keyword arguments...) -response = client.list_workflows request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/workflows/) -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/workflows/v1" -require "logger" - -client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workflows`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workflows-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-workflows`. -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-workflows-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-workflows-v1/Rakefile b/owl-bot-staging/google-cloud-workflows-v1/Rakefile deleted file mode 100644 index 13816b0b43f6..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WORKFLOWS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WORKFLOWS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/workflows/v1/workflows/credentials" - ::Google::Cloud::Workflows::V1::Workflows::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WORKFLOWS_PROJECT"] = project - ENV["WORKFLOWS_TEST_PROJECT"] = project - ENV["WORKFLOWS_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-workflows-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-workflows-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-workflows-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-workflows-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workflows-v1" - header "google-cloud-workflows-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workflows-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workflows-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-workflows-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-workflows-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-workflows-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-workflows-v1/gapic_metadata.json deleted file mode 100644 index ec6940cb8f05..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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.workflows.v1", - "libraryPackage": "::Google::Cloud::Workflows::V1", - "services": { - "Workflows": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Workflows::V1::Workflows::Client", - "rpcs": { - "ListWorkflows": { - "methods": [ - "list_workflows" - ] - }, - "GetWorkflow": { - "methods": [ - "get_workflow" - ] - }, - "CreateWorkflow": { - "methods": [ - "create_workflow" - ] - }, - "DeleteWorkflow": { - "methods": [ - "delete_workflow" - ] - }, - "UpdateWorkflow": { - "methods": [ - "update_workflow" - ] - }, - "ListWorkflowRevisions": { - "methods": [ - "list_workflow_revisions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-workflows-v1/google-cloud-workflows-v1.gemspec b/owl-bot-staging/google-cloud-workflows-v1/google-cloud-workflows-v1.gemspec deleted file mode 100644 index 52db5a4f6e82..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/google-cloud-workflows-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workflows/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workflows-v1" - gem.version = Google::Cloud::Workflows::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details." - gem.summary = "Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google-cloud-workflows-v1.rb deleted file mode 100644 index 1b638a3e422e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google-cloud-workflows-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/workflows/v1" diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1.rb deleted file mode 100644 index bda78f5b4bc6..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/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/workflows/v1/workflows" -require "google/cloud/workflows/v1/version" - -module Google - module Cloud - module Workflows - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/workflows/v1" - # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/workflows/v1" - # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/workflows/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/bindings_override.rb deleted file mode 100644 index 793a02bd64cd..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/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 Workflows - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/workflows/v1/rest" - # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workflows"] - parent_config = while namespace.any? - parent_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-workflows-v1/lib/google/cloud/workflows/v1/rest.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/rest.rb deleted file mode 100644 index 16f410759b32..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/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/workflows/v1/workflows/rest" -require "google/cloud/workflows/v1/bindings_override" -require "google/cloud/workflows/v1/version" - -module Google - module Cloud - module Workflows - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/workflows/v1/rest" - # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/version.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/version.rb deleted file mode 100644 index ad8aed01cf91..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/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 Workflows - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.rb deleted file mode 100644 index f4818691ad45..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows.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/workflows/v1/version" - -require "google/cloud/workflows/v1/workflows/credentials" -require "google/cloud/workflows/v1/workflows/paths" -require "google/cloud/workflows/v1/workflows/operations" -require "google/cloud/workflows/v1/workflows/client" -require "google/cloud/workflows/v1/workflows/rest" - -module Google - module Cloud - module Workflows - module V1 - ## - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/workflows/v1/workflows" - # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/workflows/v1/workflows/rest" - # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - module Workflows - end - end - end - end -end - -helper_path = ::File.join __dir__, "workflows", "helpers.rb" -require "google/cloud/workflows/v1/workflows/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb deleted file mode 100644 index 55f6b6df1255..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/client.rb +++ /dev/null @@ -1,1074 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/workflows/v1/workflows_pb" -require "google/cloud/location" - -module Google - module Cloud - module Workflows - module V1 - module Workflows - ## - # Client for the Workflows service. - # - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workflows_stub - - ## - # Configure the Workflows Client class. - # - # See {::Google::Cloud::Workflows::V1::Workflows::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Workflows clients - # ::Google::Cloud::Workflows::V1::Workflows::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workflows", "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 Workflows Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workflows::V1::Workflows::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @workflows_stub.universe_domain - end - - ## - # Create a new Workflows client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Workflows 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/workflows/v1/workflows_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 - - @workflows_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Workflows::V1::Workflows::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 - ) - - @workflows_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 = @workflows_stub.endpoint - config.universe_domain = @workflows_stub.universe_domain - config.logger = @workflows_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Workflows::V1::Workflows::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 - @workflows_stub.logger - end - - # Service calls - - ## - # Lists workflows in a given project and location. - # The default order is not specified. - # - # @overload list_workflows(request, options = nil) - # Pass arguments to `list_workflows` via a request object, either of type - # {::Google::Cloud::Workflows::V1::ListWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::ListWorkflowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_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. Project and location from which the workflows should be listed. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Maximum number of workflows to return per call. The service might return - # fewer than this value even if not at the end of the collection. If a value - # is not specified, a default value of 500 is used. The maximum permitted - # value is 1000 and values greater than 1000 are coerced down to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListWorkflows` must - # match the call that provided the page token. - # @param filter [::String] - # Filter to restrict results to specific workflows. - # For details, see AIP-160. - # - # For example, if you are using the Google APIs Explorer: - # - # `state="SUCCEEDED"` - # - # or - # - # `createTime>"2023-08-01" AND state="FAILED"` - # @param order_by [::String] - # Comma-separated list of fields that specify the order of the results. - # Default sorting order for a field is ascending. To specify descending order - # for a field, append a "desc" suffix. - # If not specified, the results are returned in an unspecified order. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::ListWorkflowsRequest.new - # - # # Call the list_workflows method. - # result = client.list_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::Workflows::V1::Workflow. - # p item - # end - # - def list_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::ListWorkflowsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workflows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :list_workflows, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workflows_stub, :list_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 - - ## - # Gets details of a single workflow. - # - # @overload get_workflow(request, options = nil) - # Pass arguments to `get_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1::GetWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::GetWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workflow(name: nil, revision_id: nil) - # Pass arguments to `get_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. Name of the workflow for which information should be retrieved. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @param revision_id [::String] - # Optional. The revision of the workflow to retrieve. If the revision_id is - # empty, the latest revision is retrieved. - # The format is "000001-a4d", where the first six characters define - # the zero-padded decimal revision number. They are followed by a hyphen and - # three hexadecimal characters. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workflows::V1::Workflow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workflows::V1::Workflow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::GetWorkflowRequest.new - # - # # Call the get_workflow method. - # result = client.get_workflow request - # - # # The returned object is of type Google::Cloud::Workflows::V1::Workflow. - # p result - # - def get_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::GetWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :get_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 - - ## - # Creates a new workflow. If a workflow with the specified name already - # exists in the specified project and location, the long running operation - # returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - # - # @overload create_workflow(request, options = nil) - # Pass arguments to `create_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1::CreateWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::CreateWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workflow(parent: nil, workflow: nil, workflow_id: nil) - # Pass arguments to `create_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. Project and location in which the workflow should be created. - # Format: projects/\\{project}/locations/\\{location} - # @param workflow [::Google::Cloud::Workflows::V1::Workflow, ::Hash] - # Required. Workflow to be created. - # @param workflow_id [::String] - # Required. The ID of the workflow to be created. It has to fulfill the - # following requirements: - # - # * Must contain only letters, numbers, underscores and hyphens. - # * Must start with a letter. - # * Must be between 1-64 characters. - # * Must end with a number or a letter. - # * Must be unique within the customer project and 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/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::CreateWorkflowRequest.new - # - # # Call the create_workflow method. - # result = client.create_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::CreateWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :create_workflow, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 workflow with the specified name. - # This method also cancels and deletes all running executions of the - # workflow. - # - # @overload delete_workflow(request, options = nil) - # Pass arguments to `delete_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1::DeleteWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::DeleteWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workflow(name: nil) - # Pass arguments to `delete_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. Name of the workflow to be deleted. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new - # - # # Call the delete_workflow method. - # result = client.delete_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :delete_workflow, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 workflow. - # Running this method has no impact on already running executions of the - # workflow. A new revision of the workflow might be created as a result of a - # successful update operation. In that case, the new revision is used - # in new workflow executions. - # - # @overload update_workflow(request, options = nil) - # Pass arguments to `update_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1::UpdateWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::UpdateWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workflow(workflow: nil, update_mask: nil) - # Pass arguments to `update_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 workflow [::Google::Cloud::Workflows::V1::Workflow, ::Hash] - # Required. Workflow to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields to be updated. If not present, the entire workflow - # will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new - # - # # Call the update_workflow method. - # result = client.update_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workflow&.name - header_params["workflow.name"] = request.workflow.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :update_workflow, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 revisions for a given workflow. - # - # @overload list_workflow_revisions(request, options = nil) - # Pass arguments to `list_workflow_revisions` via a request object, either of type - # {::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workflow_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workflow_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Workflow for which the revisions should be listed. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @param page_size [::Integer] - # The maximum number of revisions to return per page. If a value is not - # specified, a default value of 20 is used. The maximum permitted value is - # 100. Values greater than 100 are coerced down to 100. - # @param page_token [::String] - # The page token, received from a previous ListWorkflowRevisions call. - # Provide this to retrieve the subsequent page. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new - # - # # Call the list_workflow_revisions method. - # result = client.list_workflow_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::Workflows::V1::Workflow. - # p item - # end - # - def list_workflow_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workflow_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workflow_revisions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workflow_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :list_workflow_revisions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workflows_stub, :list_workflow_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 - - ## - # Configuration class for the Workflows API. - # - # This class represents the configuration for Workflows, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Workflows::V1::Workflows::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_workflows to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workflows::V1::Workflows::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_workflows.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_workflows.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Workflows::V1::Workflows::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflows.googleapis.com" - - config_attr :endpoint, nil, ::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 Workflows API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workflows - ## - # RPC-specific configuration for `get_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workflow - ## - # RPC-specific configuration for `create_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workflow - ## - # RPC-specific configuration for `delete_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workflow - ## - # RPC-specific configuration for `update_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workflow - ## - # RPC-specific configuration for `list_workflow_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workflow_revisions - - # @private - def initialize parent_rpcs = nil - list_workflows_config = parent_rpcs.list_workflows if parent_rpcs.respond_to? :list_workflows - @list_workflows = ::Gapic::Config::Method.new list_workflows_config - get_workflow_config = parent_rpcs.get_workflow if parent_rpcs.respond_to? :get_workflow - @get_workflow = ::Gapic::Config::Method.new get_workflow_config - create_workflow_config = parent_rpcs.create_workflow if parent_rpcs.respond_to? :create_workflow - @create_workflow = ::Gapic::Config::Method.new create_workflow_config - delete_workflow_config = parent_rpcs.delete_workflow if parent_rpcs.respond_to? :delete_workflow - @delete_workflow = ::Gapic::Config::Method.new delete_workflow_config - update_workflow_config = parent_rpcs.update_workflow if parent_rpcs.respond_to? :update_workflow - @update_workflow = ::Gapic::Config::Method.new update_workflow_config - list_workflow_revisions_config = parent_rpcs.list_workflow_revisions if parent_rpcs.respond_to? :list_workflow_revisions - @list_workflow_revisions = ::Gapic::Config::Method.new list_workflow_revisions_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/credentials.rb deleted file mode 100644 index 2c4bc8c1e0e6..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/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 Workflows - module V1 - module Workflows - # Credentials for the Workflows API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "WORKFLOWS_CREDENTIALS", - "WORKFLOWS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "WORKFLOWS_CREDENTIALS_JSON", - "WORKFLOWS_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-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb deleted file mode 100644 index 8ed984c55f7f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Workflows - module V1 - module Workflows - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Workflows 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 Workflows 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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Workflows::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflows.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/paths.rb deleted file mode 100644 index 7c5a1c321b45..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/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 Workflows - module V1 - module Workflows - # Path helper methods for the Workflows API. - module Paths - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - end - - ## - # Create a fully-qualified CryptoKeyVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # @param crypto_key_version [String] - # - # @return [::String] - def crypto_key_version_path project:, location:, key_ring:, crypto_key:, crypto_key_version: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - raise ::ArgumentError, "crypto_key cannot contain /" if crypto_key.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}/cryptoKeyVersions/#{crypto_key_version}" - end - - ## - # Create a fully-qualified 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 Workflow 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 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 diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest.rb deleted file mode 100644 index 250354de6315..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/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/workflows/v1/version" -require "google/cloud/workflows/v1/bindings_override" - -require "google/cloud/workflows/v1/workflows/credentials" -require "google/cloud/workflows/v1/workflows/paths" -require "google/cloud/workflows/v1/workflows/rest/operations" -require "google/cloud/workflows/v1/workflows/rest/client" - -module Google - module Cloud - module Workflows - module V1 - ## - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/workflows/v1/workflows/rest" - # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - module Workflows - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/workflows/v1/workflows/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb deleted file mode 100644 index d0dd3d1e2592..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/client.rb +++ /dev/null @@ -1,997 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/workflows/v1/workflows_pb" -require "google/cloud/workflows/v1/workflows/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Workflows - module V1 - module Workflows - module Rest - ## - # REST client for the Workflows service. - # - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workflows_stub - - ## - # Configure the Workflows Client class. - # - # See {::Google::Cloud::Workflows::V1::Workflows::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Workflows clients - # ::Google::Cloud::Workflows::V1::Workflows::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", "Workflows", "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 Workflows Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workflows::V1::Workflows::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 - @workflows_stub.universe_domain - end - - ## - # Create a new Workflows REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Workflows 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::Workflows::V1::Workflows::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 - - @workflows_stub = ::Google::Cloud::Workflows::V1::Workflows::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @workflows_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 = @workflows_stub.endpoint - config.universe_domain = @workflows_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @workflows_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Workflows::V1::Workflows::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 - @workflows_stub.logger - end - - # Service calls - - ## - # Lists workflows in a given project and location. - # The default order is not specified. - # - # @overload list_workflows(request, options = nil) - # Pass arguments to `list_workflows` via a request object, either of type - # {::Google::Cloud::Workflows::V1::ListWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::ListWorkflowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_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. Project and location from which the workflows should be listed. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Maximum number of workflows to return per call. The service might return - # fewer than this value even if not at the end of the collection. If a value - # is not specified, a default value of 500 is used. The maximum permitted - # value is 1000 and values greater than 1000 are coerced down to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListWorkflows` must - # match the call that provided the page token. - # @param filter [::String] - # Filter to restrict results to specific workflows. - # For details, see AIP-160. - # - # For example, if you are using the Google APIs Explorer: - # - # `state="SUCCEEDED"` - # - # or - # - # `createTime>"2023-08-01" AND state="FAILED"` - # @param order_by [::String] - # Comma-separated list of fields that specify the order of the results. - # Default sorting order for a field is ascending. To specify descending order - # for a field, append a "desc" suffix. - # If not specified, the results are returned in an unspecified order. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::ListWorkflowsRequest.new - # - # # Call the list_workflows method. - # result = client.list_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::Workflows::V1::Workflow. - # p item - # end - # - def list_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::ListWorkflowsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workflows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.list_workflows request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workflows_stub, :list_workflows, "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 - - ## - # Gets details of a single workflow. - # - # @overload get_workflow(request, options = nil) - # Pass arguments to `get_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1::GetWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::GetWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workflow(name: nil, revision_id: nil) - # Pass arguments to `get_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. Name of the workflow for which information should be retrieved. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @param revision_id [::String] - # Optional. The revision of the workflow to retrieve. If the revision_id is - # empty, the latest revision is retrieved. - # The format is "000001-a4d", where the first six characters define - # the zero-padded decimal revision number. They are followed by a hyphen and - # three hexadecimal characters. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::V1::Workflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::V1::Workflow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::GetWorkflowRequest.new - # - # # Call the get_workflow method. - # result = client.get_workflow request - # - # # The returned object is of type Google::Cloud::Workflows::V1::Workflow. - # p result - # - def get_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::GetWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.get_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 - - ## - # Creates a new workflow. If a workflow with the specified name already - # exists in the specified project and location, the long running operation - # returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - # - # @overload create_workflow(request, options = nil) - # Pass arguments to `create_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1::CreateWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::CreateWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workflow(parent: nil, workflow: nil, workflow_id: nil) - # Pass arguments to `create_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. Project and location in which the workflow should be created. - # Format: projects/\\{project}/locations/\\{location} - # @param workflow [::Google::Cloud::Workflows::V1::Workflow, ::Hash] - # Required. Workflow to be created. - # @param workflow_id [::String] - # Required. The ID of the workflow to be created. It has to fulfill the - # following requirements: - # - # * Must contain only letters, numbers, underscores and hyphens. - # * Must start with a letter. - # * Must be between 1-64 characters. - # * Must end with a number or a letter. - # * Must be unique within the customer project and 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/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::CreateWorkflowRequest.new - # - # # Call the create_workflow method. - # result = client.create_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::CreateWorkflowRequest - - # Converts hash and nil to an 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_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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.create_workflow request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workflow with the specified name. - # This method also cancels and deletes all running executions of the - # workflow. - # - # @overload delete_workflow(request, options = nil) - # Pass arguments to `delete_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1::DeleteWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::DeleteWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workflow(name: nil) - # Pass arguments to `delete_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. Name of the workflow to be deleted. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new - # - # # Call the delete_workflow method. - # result = client.delete_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.delete_workflow request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workflow. - # Running this method has no impact on already running executions of the - # workflow. A new revision of the workflow might be created as a result of a - # successful update operation. In that case, the new revision is used - # in new workflow executions. - # - # @overload update_workflow(request, options = nil) - # Pass arguments to `update_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1::UpdateWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::UpdateWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workflow(workflow: nil, update_mask: nil) - # Pass arguments to `update_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 workflow [::Google::Cloud::Workflows::V1::Workflow, ::Hash] - # Required. Workflow to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields to be updated. If not present, the entire workflow - # will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new - # - # # Call the update_workflow method. - # result = client.update_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.update_workflow request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 revisions for a given workflow. - # - # @overload list_workflow_revisions(request, options = nil) - # Pass arguments to `list_workflow_revisions` via a request object, either of type - # {::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workflow_revisions(name: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workflow_revisions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Workflow for which the revisions should be listed. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @param page_size [::Integer] - # The maximum number of revisions to return per page. If a value is not - # specified, a default value of 20 is used. The maximum permitted value is - # 100. Values greater than 100 are coerced down to 100. - # @param page_token [::String] - # The page token, received from a previous ListWorkflowRevisions call. - # Provide this to retrieve the subsequent page. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1::Workflow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new - # - # # Call the list_workflow_revisions method. - # result = client.list_workflow_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::Workflows::V1::Workflow. - # p item - # end - # - def list_workflow_revisions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workflow_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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workflow_revisions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workflow_revisions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.list_workflow_revisions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workflows_stub, :list_workflow_revisions, "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 - - ## - # Configuration class for the Workflows REST API. - # - # This class represents the configuration for Workflows 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::Workflows::V1::Workflows::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_workflows to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_workflows.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_workflows.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflows.googleapis.com" - - config_attr :endpoint, nil, ::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 Workflows API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workflows - ## - # RPC-specific configuration for `get_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workflow - ## - # RPC-specific configuration for `create_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workflow - ## - # RPC-specific configuration for `delete_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workflow - ## - # RPC-specific configuration for `update_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workflow - ## - # RPC-specific configuration for `list_workflow_revisions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workflow_revisions - - # @private - def initialize parent_rpcs = nil - list_workflows_config = parent_rpcs.list_workflows if parent_rpcs.respond_to? :list_workflows - @list_workflows = ::Gapic::Config::Method.new list_workflows_config - get_workflow_config = parent_rpcs.get_workflow if parent_rpcs.respond_to? :get_workflow - @get_workflow = ::Gapic::Config::Method.new get_workflow_config - create_workflow_config = parent_rpcs.create_workflow if parent_rpcs.respond_to? :create_workflow - @create_workflow = ::Gapic::Config::Method.new create_workflow_config - delete_workflow_config = parent_rpcs.delete_workflow if parent_rpcs.respond_to? :delete_workflow - @delete_workflow = ::Gapic::Config::Method.new delete_workflow_config - update_workflow_config = parent_rpcs.update_workflow if parent_rpcs.respond_to? :update_workflow - @update_workflow = ::Gapic::Config::Method.new update_workflow_config - list_workflow_revisions_config = parent_rpcs.list_workflow_revisions if parent_rpcs.respond_to? :list_workflow_revisions - @list_workflow_revisions = ::Gapic::Config::Method.new list_workflow_revisions_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb deleted file mode 100644 index 7aead07230f8..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Workflows - module V1 - module Workflows - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Workflows 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 Workflows 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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workflows::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflows.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb deleted file mode 100644 index c36b18474d53..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows/rest/service_stub.rb +++ /dev/null @@ -1,449 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workflows/v1/workflows_pb" - -module Google - module Cloud - module Workflows - module V1 - module Workflows - module Rest - ## - # REST service stub for the Workflows 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_workflows REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::ListWorkflowsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::V1::ListWorkflowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::V1::ListWorkflowsResponse] - # A result object deserialized from the server's reply - def list_workflows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_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_workflows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workflows::V1::ListWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::GetWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::V1::Workflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::V1::Workflow] - # A result object deserialized from the server's reply - def get_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_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_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workflows::V1::Workflow.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_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::CreateWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_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_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::DeleteWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::UpdateWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_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: "update_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workflow_revisions REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse] - # A result object deserialized from the server's reply - def list_workflow_revisions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workflow_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_workflow_revisions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse.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_workflows REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::ListWorkflowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workflows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workflows", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::GetWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::CreateWorkflowRequest] - # 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_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/workflows", - body: "workflow", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::DeleteWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::UpdateWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{workflow.name}", - body: "workflow", - matches: [ - ["workflow.name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workflow_revisions REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workflow_revisions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}:listRevisions", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb deleted file mode 100644 index cfa8106f8498..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_pb.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/workflows/v1/workflows.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/cloud/workflows/v1/workflows.proto\x12\x19google.cloud.workflows.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8d\r\n\x08Workflow\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12=\n\x05state\x18\x03 \x01(\x0e\x32).google.cloud.workflows.v1.Workflow.StateB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32/.google.cloud.workflows.v1.Workflow.LabelsEntry\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12\x19\n\x0fsource_contents\x18\n \x01(\tH\x00\x12\x42\n\x0f\x63rypto_key_name\x18\x0b \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12H\n\x0bstate_error\x18\x0c \x01(\x0b\x32..google.cloud.workflows.v1.Workflow.StateErrorB\x03\xe0\x41\x03\x12M\n\x0e\x63\x61ll_log_level\x18\r \x01(\x0e\x32\x30.google.cloud.workflows.v1.Workflow.CallLogLevelB\x03\xe0\x41\x01\x12P\n\ruser_env_vars\x18\x0e \x03(\x0b\x32\x34.google.cloud.workflows.v1.Workflow.UserEnvVarsEntryB\x03\xe0\x41\x01\x12V\n\x17\x65xecution_history_level\x18\x0f \x01(\x0e\x32\x30.google.cloud.workflows.v1.ExecutionHistoryLevelB\x03\xe0\x41\x01\x12?\n\x0c\x61ll_kms_keys\x18\x10 \x03(\tB)\xe0\x41\x03\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12O\n\x15\x61ll_kms_keys_versions\x18\x11 \x03(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12L\n\x12\x63rypto_key_version\x18\x12 \x01(\tB0\xe0\x41\x03\xfa\x41*\n(cloudkms.googleapis.com/CryptoKeyVersion\x12\x46\n\x04tags\x18\x13 \x03(\x0b\x32-.google.cloud.workflows.v1.Workflow.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x1a\x8d\x01\n\nStateError\x12\x0f\n\x07\x64\x65tails\x18\x01 \x01(\t\x12\x41\n\x04type\x18\x02 \x01(\x0e\x32\x33.google.cloud.workflows.v1.Workflow.StateError.Type\"+\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\r\n\tKMS_ERROR\x10\x01\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\x10UserEnvVarsEntry\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\";\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0f\n\x0bUNAVAILABLE\x10\x02\"d\n\x0c\x43\x61llLogLevel\x12\x1e\n\x1a\x43\x41LL_LOG_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rLOG_ALL_CALLS\x10\x01\x12\x13\n\x0fLOG_ERRORS_ONLY\x10\x02\x12\x0c\n\x08LOG_NONE\x10\x03:d\xea\x41\x61\n!workflows.googleapis.com/Workflow\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/workflows\x12\x9f\x01\n\x0bGetWorkflow\x12-.google.cloud.workflows.v1.GetWorkflowRequest\x1a#.google.cloud.workflows.v1.Workflow\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/workflows/*}\x12\xe0\x01\n\x0e\x43reateWorkflow\x12\x30.google.cloud.workflows.v1.CreateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\xda\x41\x1bparent,workflow,workflow_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/workflows:\x08workflow\x12\xcc\x01\n\x0e\x44\x65leteWorkflow\x12\x30.google.cloud.workflows.v1.DeleteWorkflowRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/workflows/*}\x12\xe2\x01\n\x0eUpdateWorkflow\x12\x30.google.cloud.workflows.v1.UpdateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\xda\x41\x14workflow,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{workflow.name=projects/*/locations/*/workflows/*}:\x08workflow\x12\xcf\x01\n\x15ListWorkflowRevisions\x12\x37.google.cloud.workflows.v1.ListWorkflowRevisionsRequest\x1a\x38.google.cloud.workflows.v1.ListWorkflowRevisionsResponse\"C\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/workflows/*}:listRevisions\x1aL\xca\x41\x18workflows.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x8d\x03\n\x1d\x63om.google.cloud.workflows.v1B\x0eWorkflowsProtoP\x01Z;cloud.google.com/go/workflows/apiv1/workflowspb;workflowspb\xea\x41v\n!cloudkms.googleapis.com/CryptoKey\x12Qprojects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}\xea\x41\xa2\x01\n(cloudkms.googleapis.com/CryptoKeyVersion\x12vprojects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Workflows - module V1 - Workflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow").msgclass - Workflow::StateError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.StateError").msgclass - Workflow::StateError::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.StateError.Type").enummodule - Workflow::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.State").enummodule - Workflow::CallLogLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.Workflow.CallLogLevel").enummodule - ListWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowsRequest").msgclass - ListWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowsResponse").msgclass - GetWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.GetWorkflowRequest").msgclass - CreateWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.CreateWorkflowRequest").msgclass - DeleteWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.DeleteWorkflowRequest").msgclass - UpdateWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.UpdateWorkflowRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.OperationMetadata").msgclass - ListWorkflowRevisionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowRevisionsRequest").msgclass - ListWorkflowRevisionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ListWorkflowRevisionsResponse").msgclass - ExecutionHistoryLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1.ExecutionHistoryLevel").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb b/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb deleted file mode 100644 index d568aa342f04..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/lib/google/cloud/workflows/v1/workflows_services_pb.rb +++ /dev/null @@ -1,66 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/workflows/v1/workflows.proto for package 'google.cloud.workflows.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/workflows/v1/workflows_pb' - -module Google - module Cloud - module Workflows - module V1 - module Workflows - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.workflows.v1.Workflows' - - # Lists workflows in a given project and location. - # The default order is not specified. - rpc :ListWorkflows, ::Google::Cloud::Workflows::V1::ListWorkflowsRequest, ::Google::Cloud::Workflows::V1::ListWorkflowsResponse - # Gets details of a single workflow. - rpc :GetWorkflow, ::Google::Cloud::Workflows::V1::GetWorkflowRequest, ::Google::Cloud::Workflows::V1::Workflow - # Creates a new workflow. If a workflow with the specified name already - # exists in the specified project and location, the long running operation - # returns a [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - rpc :CreateWorkflow, ::Google::Cloud::Workflows::V1::CreateWorkflowRequest, ::Google::Longrunning::Operation - # Deletes a workflow with the specified name. - # This method also cancels and deletes all running executions of the - # workflow. - rpc :DeleteWorkflow, ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest, ::Google::Longrunning::Operation - # Updates an existing workflow. - # Running this method has no impact on already running executions of the - # workflow. A new revision of the workflow might be created as a result of a - # successful update operation. In that case, the new revision is used - # in new workflow executions. - rpc :UpdateWorkflow, ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest, ::Google::Longrunning::Operation - # Lists revisions for a given workflow. - rpc :ListWorkflowRevisions, ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest, ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/README.md deleted file mode 100644 index 5e25ae83a219..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Workflows 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-workflows-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb deleted file mode 100644 index 78a09faef384..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/cloud/workflows/v1/workflows.rb +++ /dev/null @@ -1,424 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Workflows - module V1 - # Workflow program to be executed by Workflows. - # @!attribute [rw] name - # @return [::String] - # The resource name of the workflow. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow}. - # This is a workflow-wide field and is not tied to a specific revision. - # @!attribute [rw] description - # @return [::String] - # Description of the workflow provided by the user. - # Must be at most 1000 Unicode characters long. - # This is a workflow-wide field and is not tied to a specific revision. - # @!attribute [r] state - # @return [::Google::Cloud::Workflows::V1::Workflow::State] - # Output only. State of the workflow deployment. - # @!attribute [r] revision_id - # @return [::String] - # Output only. The revision of the workflow. - # A new revision of a workflow is created as a result of updating the - # following properties of a workflow: - # - # - {::Google::Cloud::Workflows::V1::Workflow#service_account Service account} - # - [Workflow code to be - # executed][google.cloud.workflows.v1.Workflow.source_contents] - # - # The format is "000001-a4d", where the first six characters define - # the zero-padded revision ordinal number. They are followed by a hyphen and - # three hexadecimal random characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp for when the workflow was created. - # This is a workflow-wide field and is not tied to a specific revision. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp for when the workflow was last updated. - # This is a workflow-wide field and is not tied to a specific revision. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp for the latest revision of the workflow's - # creation. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with this workflow. - # Labels can contain at most 64 entries. Keys and values can be no longer - # than 63 characters and can only contain lowercase letters, numeric - # characters, underscores, and dashes. Label keys must start with a letter. - # International characters are allowed. - # This is a workflow-wide field and is not tied to a specific revision. - # @!attribute [rw] service_account - # @return [::String] - # The service account associated with the latest workflow version. - # This service account represents the identity of the workflow and determines - # what permissions the workflow has. - # Format: projects/\\{project}/serviceAccounts/\\{account} or \\{account} - # - # Using `-` as a wildcard for the `{project}` or not providing one at all - # will infer the project from the account. The `{account}` value can be the - # `email` address or the `unique_id` of the service account. - # - # If not provided, workflow will use the project's default service account. - # Modifying this field for an existing workflow results in a new workflow - # revision. - # @!attribute [rw] source_contents - # @return [::String] - # Workflow code to be executed. The size limit is 128KB. - # @!attribute [rw] crypto_key_name - # @return [::String] - # Optional. The resource name of a KMS crypto key used to encrypt or decrypt - # the data associated with the workflow. - # - # Format: - # projects/\\{project}/locations/\\{location}/keyRings/\\{keyRing}/cryptoKeys/\\{cryptoKey} - # - # Using `-` as a wildcard for the `{project}` or not providing one at all - # will infer the project from the account. - # - # If not provided, data associated with the workflow will not be - # CMEK-encrypted. - # @!attribute [r] state_error - # @return [::Google::Cloud::Workflows::V1::Workflow::StateError] - # Output only. Error regarding the state of the workflow. For example, this - # field will have error details if the execution data is unavailable due to - # revoked KMS key permissions. - # @!attribute [rw] call_log_level - # @return [::Google::Cloud::Workflows::V1::Workflow::CallLogLevel] - # Optional. Describes the level of platform logging to apply to calls and - # call responses during executions of this workflow. If both the workflow and - # the execution specify a logging level, the execution level takes - # precedence. - # @!attribute [rw] user_env_vars - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined environment variables associated with this workflow - # revision. This map has a maximum length of 20. Each string can take up to - # 4KiB. Keys cannot be empty strings and cannot start with "GOOGLE" or - # "WORKFLOWS". - # @!attribute [rw] execution_history_level - # @return [::Google::Cloud::Workflows::V1::ExecutionHistoryLevel] - # Optional. Describes the execution history level to apply to this workflow. - # @!attribute [r] all_kms_keys - # @return [::Array<::String>] - # Output only. A list of all KMS crypto keys used to encrypt or decrypt the - # data associated with the workflow. - # @!attribute [r] all_kms_keys_versions - # @return [::Array<::String>] - # Output only. A list of all KMS crypto key versions used to encrypt or - # decrypt the data associated with the workflow. - # @!attribute [r] crypto_key_version - # @return [::String] - # Output only. The resource name of a KMS crypto key version used to encrypt - # or decrypt the data associated with the workflow. - # - # Format: - # projects/\\{project}/locations/\\{location}/keyRings/\\{keyRing}/cryptoKeys/\\{cryptoKey}/cryptoKeyVersions/\\{cryptoKeyVersion} - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tags associated with this workflow. - class Workflow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes an error related to the current state of the workflow. - # @!attribute [rw] details - # @return [::String] - # Provides specifics about the error. - # @!attribute [rw] type - # @return [::Google::Cloud::Workflows::V1::Workflow::StateError::Type] - # The type of this state error. - class StateError - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the possibled types of a state error. - module Type - # No type specified. - TYPE_UNSPECIFIED = 0 - - # Caused by an issue with KMS. - KMS_ERROR = 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class UserEnvVarsEntry - 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 - - # Describes the current state of workflow deployment. - module State - # Invalid state. - STATE_UNSPECIFIED = 0 - - # The workflow has been deployed successfully and is serving. - ACTIVE = 1 - - # Workflow data is unavailable. See the `state_error` field. - UNAVAILABLE = 2 - end - - # Describes the level of platform logging to apply to calls and call - # responses during workflow executions. - module CallLogLevel - # No call logging level specified. - CALL_LOG_LEVEL_UNSPECIFIED = 0 - - # Log all call steps within workflows, all call returns, and all exceptions - # raised. - LOG_ALL_CALLS = 1 - - # Log only exceptions that are raised from call steps within workflows. - LOG_ERRORS_ONLY = 2 - - # Explicitly log nothing. - LOG_NONE = 3 - end - end - - # Request for the - # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflows ListWorkflows} - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location from which the workflows should be listed. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of workflows to return per call. The service might return - # fewer than this value even if not at the end of the collection. If a value - # is not specified, a default value of 500 is used. The maximum permitted - # value is 1000 and values greater than 1000 are coerced down to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListWorkflows` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Filter to restrict results to specific workflows. - # For details, see AIP-160. - # - # For example, if you are using the Google APIs Explorer: - # - # `state="SUCCEEDED"` - # - # or - # - # `createTime>"2023-08-01" AND state="FAILED"` - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of fields that specify the order of the results. - # Default sorting order for a field is ascending. To specify descending order - # for a field, append a "desc" suffix. - # If not specified, the results are returned in an unspecified order. - class ListWorkflowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the - # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflows ListWorkflows} - # method. - # @!attribute [rw] workflows - # @return [::Array<::Google::Cloud::Workflows::V1::Workflow>] - # The workflows that match the request. - # @!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>] - # Unreachable resources. - class ListWorkflowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::V1::Workflows::Client#get_workflow GetWorkflow} method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workflow for which information should be retrieved. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @!attribute [rw] revision_id - # @return [::String] - # Optional. The revision of the workflow to retrieve. If the revision_id is - # empty, the latest revision is retrieved. - # The format is "000001-a4d", where the first six characters define - # the zero-padded decimal revision number. They are followed by a hyphen and - # three hexadecimal characters. - class GetWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::V1::Workflows::Client#create_workflow CreateWorkflow} - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location in which the workflow should be created. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] workflow - # @return [::Google::Cloud::Workflows::V1::Workflow] - # Required. Workflow to be created. - # @!attribute [rw] workflow_id - # @return [::String] - # Required. The ID of the workflow to be created. It has to fulfill the - # following requirements: - # - # * Must contain only letters, numbers, underscores and hyphens. - # * Must start with a letter. - # * Must be between 1-64 characters. - # * Must end with a number or a letter. - # * Must be unique within the customer project and location. - class CreateWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::V1::Workflows::Client#delete_workflow DeleteWorkflow} - # method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workflow to be deleted. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - class DeleteWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::V1::Workflows::Client#update_workflow UpdateWorkflow} - # method. - # @!attribute [rw] workflow - # @return [::Google::Cloud::Workflows::V1::Workflow] - # Required. Workflow to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # List of fields to be updated. If not present, the entire workflow - # will be updated. - class UpdateWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation was created. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation finished running. - # @!attribute [rw] target - # @return [::String] - # Server-defined resource path for the target of the operation. - # @!attribute [rw] verb - # @return [::String] - # Name of the verb executed by the operation. - # @!attribute [rw] api_version - # @return [::String] - # API version used to start the operation. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions ListWorkflowRevisions} - # method. - # @!attribute [rw] name - # @return [::String] - # Required. Workflow for which the revisions should be listed. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of revisions to return per page. If a value is not - # specified, a default value of 20 is used. The maximum permitted value is - # 100. Values greater than 100 are coerced down to 100. - # @!attribute [rw] page_token - # @return [::String] - # The page token, received from a previous ListWorkflowRevisions call. - # Provide this to retrieve the subsequent page. - class ListWorkflowRevisionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the - # {::Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions ListWorkflowRevisions} - # method. - # @!attribute [rw] workflows - # @return [::Array<::Google::Cloud::Workflows::V1::Workflow>] - # The revisions of the workflow, ordered in reverse chronological order. - # @!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 ListWorkflowRevisionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Define possible options for enabling the execution history level. - module ExecutionHistoryLevel - # The default/unset value. - EXECUTION_HISTORY_LEVEL_UNSPECIFIED = 0 - - # Enable execution history basic feature. - EXECUTION_HISTORY_BASIC = 1 - - # Enable execution history detailed feature. - EXECUTION_HISTORY_DETAILED = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workflows-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-workflows-v1/snippets/Gemfile deleted file mode 100644 index 3f40a63d2540..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1", path: "../" -else - gem "google-cloud-workflows-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-workflows-v1/snippets/snippet_metadata_google.cloud.workflows.v1.json b/owl-bot-staging/google-cloud-workflows-v1/snippets/snippet_metadata_google.cloud.workflows.v1.json deleted file mode 100644 index 64415098c15f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/snippets/snippet_metadata_google.cloud.workflows.v1.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-workflows-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.workflows.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "workflows_v1_generated_Workflows_ListWorkflows_sync", - "title": "Snippet for the list_workflows call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#list_workflows.", - "file": "workflows/list_workflows.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workflows", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#list_workflows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1::ListWorkflowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::V1::ListWorkflowsResponse", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" - }, - "method": { - "short_name": "ListWorkflows", - "full_name": "google.cloud.workflows.v1.Workflows.ListWorkflows", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1.Workflows" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflows_v1_generated_Workflows_GetWorkflow_sync", - "title": "Snippet for the get_workflow call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#get_workflow.", - "file": "workflows/get_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workflow", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#get_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1::GetWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::V1::Workflow", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" - }, - "method": { - "short_name": "GetWorkflow", - "full_name": "google.cloud.workflows.v1.Workflows.GetWorkflow", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1.Workflows" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflows_v1_generated_Workflows_CreateWorkflow_sync", - "title": "Snippet for the create_workflow call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#create_workflow.", - "file": "workflows/create_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workflow", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#create_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1::CreateWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" - }, - "method": { - "short_name": "CreateWorkflow", - "full_name": "google.cloud.workflows.v1.Workflows.CreateWorkflow", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1.Workflows" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflows_v1_generated_Workflows_DeleteWorkflow_sync", - "title": "Snippet for the delete_workflow call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#delete_workflow.", - "file": "workflows/delete_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workflow", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#delete_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1::DeleteWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" - }, - "method": { - "short_name": "DeleteWorkflow", - "full_name": "google.cloud.workflows.v1.Workflows.DeleteWorkflow", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1.Workflows" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflows_v1_generated_Workflows_UpdateWorkflow_sync", - "title": "Snippet for the update_workflow call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#update_workflow.", - "file": "workflows/update_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workflow", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#update_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1::UpdateWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" - }, - "method": { - "short_name": "UpdateWorkflow", - "full_name": "google.cloud.workflows.v1.Workflows.UpdateWorkflow", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1.Workflows" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflows_v1_generated_Workflows_ListWorkflowRevisions_sync", - "title": "Snippet for the list_workflow_revisions call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions.", - "file": "workflows/list_workflow_revisions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workflow_revisions", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1::Workflows::Client" - }, - "method": { - "short_name": "ListWorkflowRevisions", - "full_name": "google.cloud.workflows.v1.Workflows.ListWorkflowRevisions", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1.Workflows" - } - } - }, - "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-workflows-v1/snippets/workflows/create_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/create_workflow.rb deleted file mode 100644 index 57bb5d7052f6..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/create_workflow.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 workflows_v1_generated_Workflows_CreateWorkflow_sync] -require "google/cloud/workflows/v1" - -## -# Snippet for the create_workflow call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1::Workflows::Client#create_workflow. -# -def create_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1::CreateWorkflowRequest.new - - # Call the create_workflow method. - result = client.create_workflow request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workflows_v1_generated_Workflows_CreateWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/delete_workflow.rb deleted file mode 100644 index ee3a675341df..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/delete_workflow.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 workflows_v1_generated_Workflows_DeleteWorkflow_sync] -require "google/cloud/workflows/v1" - -## -# Snippet for the delete_workflow call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1::Workflows::Client#delete_workflow. -# -def delete_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new - - # Call the delete_workflow method. - result = client.delete_workflow request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workflows_v1_generated_Workflows_DeleteWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/get_workflow.rb deleted file mode 100644 index 8e945eb77b52..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/get_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 workflows_v1_generated_Workflows_GetWorkflow_sync] -require "google/cloud/workflows/v1" - -## -# Snippet for the get_workflow call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1::Workflows::Client#get_workflow. -# -def get_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1::GetWorkflowRequest.new - - # Call the get_workflow method. - result = client.get_workflow request - - # The returned object is of type Google::Cloud::Workflows::V1::Workflow. - p result -end -# [END workflows_v1_generated_Workflows_GetWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflow_revisions.rb deleted file mode 100644 index 24fa4adf9ff9..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflow_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 workflows_v1_generated_Workflows_ListWorkflowRevisions_sync] -require "google/cloud/workflows/v1" - -## -# Snippet for the list_workflow_revisions call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1::Workflows::Client#list_workflow_revisions. -# -def list_workflow_revisions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new - - # Call the list_workflow_revisions method. - result = client.list_workflow_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::Workflows::V1::Workflow. - p item - end -end -# [END workflows_v1_generated_Workflows_ListWorkflowRevisions_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_workflows.rb deleted file mode 100644 index 423d261480f1..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/list_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 workflows_v1_generated_Workflows_ListWorkflows_sync] -require "google/cloud/workflows/v1" - -## -# Snippet for the list_workflows call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1::Workflows::Client#list_workflows. -# -def list_workflows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1::ListWorkflowsRequest.new - - # Call the list_workflows method. - result = client.list_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::Workflows::V1::Workflow. - p item - end -end -# [END workflows_v1_generated_Workflows_ListWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/update_workflow.rb deleted file mode 100644 index 20e240695166..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/snippets/workflows/update_workflow.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 workflows_v1_generated_Workflows_UpdateWorkflow_sync] -require "google/cloud/workflows/v1" - -## -# Snippet for the update_workflow call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1::Workflows::Client#update_workflow. -# -def update_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new - - # Call the update_workflow method. - result = client.update_workflow request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workflows_v1_generated_Workflows_UpdateWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_operations_test.rb deleted file mode 100644 index 733d55434ff1..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_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/workflows/v1/workflows_pb" -require "google/cloud/workflows/v1/workflows_services_pb" -require "google/cloud/workflows/v1/workflows" - -class ::Google::Cloud::Workflows::V1::Workflows::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Workflows::V1::Workflows::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::Workflows::V1::Workflows::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_paths_test.rb deleted file mode 100644 index 940534eeb434..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_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/workflows/v1/workflows" - -class ::Google::Cloud::Workflows::V1::Workflows::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_crypto_key_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Workflows::V1::Workflows::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_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::Workflows::V1::Workflows::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_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::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.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-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb deleted file mode 100644 index 475012b3f7fd..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_rest_test.rb +++ /dev/null @@ -1,433 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/workflows/v1/workflows_pb" -require "google/cloud/workflows/v1/workflows/rest" - - -class ::Google::Cloud::Workflows::V1::Workflows::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_workflows - # Create test objects. - client_result = ::Google::Cloud::Workflows::V1::ListWorkflowsResponse.new - http_response = OpenStruct.new 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_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_list_workflows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workflows_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workflows parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workflows ::Google::Cloud::Workflows::V1::ListWorkflowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workflows(::Google::Cloud::Workflows::V1::ListWorkflowsRequest.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_workflows_client_stub.call_count - end - end - end - - def test_get_workflow - # Create test objects. - client_result = ::Google::Cloud::Workflows::V1::Workflow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revision_id = "hello world" - - get_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_get_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workflow({ name: name, revision_id: revision_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workflow name: name, revision_id: revision_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workflow ::Google::Cloud::Workflows::V1::GetWorkflowRequest.new(name: name, revision_id: revision_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workflow({ name: name, revision_id: revision_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workflow(::Google::Cloud::Workflows::V1::GetWorkflowRequest.new(name: name, revision_id: revision_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workflow_client_stub.call_count - end - end - end - - def test_create_workflow - # Create test objects. - 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" - workflow = {} - workflow_id = "hello world" - - create_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_create_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workflow ::Google::Cloud::Workflows::V1::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workflow(::Google::Cloud::Workflows::V1::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workflow_client_stub.call_count - end - end - end - - def test_delete_workflow - # Create test objects. - 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_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_delete_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workflow ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workflow(::Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workflow_client_stub.call_count - end - end - end - - def test_update_workflow - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workflow = {} - update_mask = {} - - update_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_update_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workflow ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workflow({ workflow: workflow, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workflow(::Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workflow_client_stub.call_count - end - end - end - - def test_list_workflow_revisions - # Create test objects. - client_result = ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_workflow_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::Workflows::V1::Workflows::Rest::ServiceStub.stub :transcode_list_workflow_revisions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workflow_revisions_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workflow_revisions({ name: name, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workflow_revisions name: name, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workflow_revisions ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workflow_revisions({ name: name, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workflow_revisions(::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_workflow_revisions_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::Workflows::V1::Workflows::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::Workflows::V1::Workflows::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb b/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb deleted file mode 100644 index 588d6ca4b23a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/test/google/cloud/workflows/v1/workflows_test.rb +++ /dev/null @@ -1,511 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workflows/v1/workflows_pb" -require "google/cloud/workflows/v1/workflows" - -class ::Google::Cloud::Workflows::V1::Workflows::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_workflows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::V1::ListWorkflowsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workflows, name - assert_kind_of ::Google::Cloud::Workflows::V1::ListWorkflowsRequest, 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_workflows_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workflows parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workflows ::Google::Cloud::Workflows::V1::ListWorkflowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workflows(::Google::Cloud::Workflows::V1::ListWorkflowsRequest.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_workflows_client_stub.call_rpc_count - end - end - - def test_get_workflow - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::V1::Workflow.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revision_id = "hello world" - - get_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workflow, name - assert_kind_of ::Google::Cloud::Workflows::V1::GetWorkflowRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["revision_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workflow({ name: name, revision_id: revision_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workflow name: name, revision_id: revision_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workflow ::Google::Cloud::Workflows::V1::GetWorkflowRequest.new(name: name, revision_id: revision_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workflow({ name: name, revision_id: revision_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workflow(::Google::Cloud::Workflows::V1::GetWorkflowRequest.new(name: name, revision_id: revision_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workflow_client_stub.call_rpc_count - end - end - - def test_create_workflow - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workflow = {} - workflow_id = "hello world" - - create_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workflow, name - assert_kind_of ::Google::Cloud::Workflows::V1::CreateWorkflowRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::V1::Workflow), request["workflow"] - assert_equal "hello world", request["workflow_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workflow ::Google::Cloud::Workflows::V1::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workflow(::Google::Cloud::Workflows::V1::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_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_workflow_client_stub.call_rpc_count - end - end - - def test_delete_workflow - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workflow, name - assert_kind_of ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workflow({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workflow name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workflow ::Google::Cloud::Workflows::V1::DeleteWorkflowRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workflow({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workflow(::Google::Cloud::Workflows::V1::DeleteWorkflowRequest.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_workflow_client_stub.call_rpc_count - end - end - - def test_update_workflow - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workflow = {} - update_mask = {} - - update_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workflow, name - assert_kind_of ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::V1::Workflow), request["workflow"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workflow({ workflow: workflow, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_workflow workflow: workflow, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_workflow ::Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_workflow({ workflow: workflow, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_workflow(::Google::Cloud::Workflows::V1::UpdateWorkflowRequest.new(workflow: workflow, 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_workflow_client_stub.call_rpc_count - end - end - - def test_list_workflow_revisions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - page_size = 42 - page_token = "hello world" - - list_workflow_revisions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workflow_revisions, name - assert_kind_of ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_workflow_revisions_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workflow_revisions({ name: name, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workflow_revisions name: name, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workflow_revisions ::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workflow_revisions({ name: name, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workflow_revisions(::Google::Cloud::Workflows::V1::ListWorkflowRevisionsRequest.new(name: name, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_workflow_revisions_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::Workflows::V1::Workflows::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::Workflows::V1::Workflows::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::Workflows::V1::Workflows::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Workflows::V1::Workflows::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::Workflows::V1::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Workflows::V1::Workflows::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1/test/helper.rb b/owl-bot-staging/google-cloud-workflows-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore b/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows-v1beta/.repo-metadata.json deleted file mode 100644 index 1d4a95557ac5..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "workflows.googleapis.com", - "api_shortname": "workflows", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1beta/latest", - "distribution_name": "google-cloud-workflows-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "workflows", - "name_pretty": "Workflows V1beta API", - "product_documentation": "https://cloud.google.com/workflows/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details.", - "ruby-cloud-env-prefix": "WORKFLOWS", - "ruby-cloud-product-url": "https://cloud.google.com/workflows/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-workflows-v1beta/.rubocop.yml deleted file mode 100644 index 40c98f2b2441..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workflows-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-workflows-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/.toys.rb b/owl-bot-staging/google-cloud-workflows-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/.yardopts b/owl-bot-staging/google-cloud-workflows-v1beta/.yardopts deleted file mode 100644 index 56f969dffb3b..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Workflows 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-workflows-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows-v1beta/AUTHENTICATION.md deleted file mode 100644 index 5854f731e93e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workflows-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-workflows-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/workflows/v1beta" - -client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workflows/v1beta" - -::Google::Cloud::Workflows::V1beta::Workflows::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Workflows::V1beta::Workflows::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-workflows-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/workflows/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Workflows::V1beta::Workflows::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-workflows-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/Gemfile b/owl-bot-staging/google-cloud-workflows-v1beta/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-workflows-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/README.md b/owl-bot-staging/google-cloud-workflows-v1beta/README.md deleted file mode 100644 index 9bd00b31c471..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Workflows V1beta API - -Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API. - -Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Workflows V1beta API. Most users should consider using -the main client gem, -[google-cloud-workflows](https://rubygems.org/gems/google-cloud-workflows). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-workflows-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/workflows.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/workflows/v1beta" - -client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new -request = ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new # (request fields as keyword arguments...) -response = client.list_workflows request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/workflows/) -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/workflows/v1beta" -require "logger" - -client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workflows`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workflows-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-workflows`. -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-workflows-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-workflows-v1beta/Rakefile b/owl-bot-staging/google-cloud-workflows-v1beta/Rakefile deleted file mode 100644 index 26a1b0335b69..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WORKFLOWS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WORKFLOWS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/workflows/v1beta/workflows/credentials" - ::Google::Cloud::Workflows::V1beta::Workflows::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WORKFLOWS_PROJECT"] = project - ENV["WORKFLOWS_TEST_PROJECT"] = project - ENV["WORKFLOWS_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-workflows-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-workflows-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-workflows-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-workflows-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workflows-v1beta" - header "google-cloud-workflows-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workflows-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workflows-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-workflows-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-workflows-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-workflows-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-workflows-v1beta/gapic_metadata.json deleted file mode 100644 index 251ea95013fb..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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.workflows.v1beta", - "libraryPackage": "::Google::Cloud::Workflows::V1beta", - "services": { - "Workflows": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Workflows::V1beta::Workflows::Client", - "rpcs": { - "ListWorkflows": { - "methods": [ - "list_workflows" - ] - }, - "GetWorkflow": { - "methods": [ - "get_workflow" - ] - }, - "CreateWorkflow": { - "methods": [ - "create_workflow" - ] - }, - "DeleteWorkflow": { - "methods": [ - "delete_workflow" - ] - }, - "UpdateWorkflow": { - "methods": [ - "update_workflow" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/google-cloud-workflows-v1beta.gemspec b/owl-bot-staging/google-cloud-workflows-v1beta/google-cloud-workflows-v1beta.gemspec deleted file mode 100644 index 443d6bd40ddd..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/google-cloud-workflows-v1beta.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workflows/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workflows-v1beta" - gem.version = Google::Cloud::Workflows::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.. Note that google-cloud-workflows-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workflows instead. See the readme for more details." - gem.summary = "Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google-cloud-workflows-v1beta.rb deleted file mode 100644 index 6570d59e4c97..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google-cloud-workflows-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/workflows/v1beta" diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta.rb deleted file mode 100644 index 8ffa325a3d21..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/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/workflows/v1beta/workflows" -require "google/cloud/workflows/v1beta/version" - -module Google - module Cloud - module Workflows - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/workflows/v1beta" - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/workflows/v1beta" - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - module V1beta - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/workflows/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/bindings_override.rb deleted file mode 100644 index 89cc4db94d26..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/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 Workflows - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/workflows/v1beta/rest" - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - module V1beta - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workflows"] - parent_config = while namespace.any? - parent_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-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/rest.rb deleted file mode 100644 index 449f092f35af..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/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/workflows/v1beta/workflows/rest" -require "google/cloud/workflows/v1beta/bindings_override" -require "google/cloud/workflows/v1beta/version" - -module Google - module Cloud - module Workflows - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/workflows/v1beta/rest" - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - module V1beta - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/version.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/version.rb deleted file mode 100644 index 0bdbdee492ae..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/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 Workflows - module V1beta - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.rb deleted file mode 100644 index 0fcbf048c458..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows.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/workflows/v1beta/version" - -require "google/cloud/workflows/v1beta/workflows/credentials" -require "google/cloud/workflows/v1beta/workflows/paths" -require "google/cloud/workflows/v1beta/workflows/operations" -require "google/cloud/workflows/v1beta/workflows/client" -require "google/cloud/workflows/v1beta/workflows/rest" - -module Google - module Cloud - module Workflows - module V1beta - ## - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/workflows/v1beta/workflows" - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/workflows/v1beta/workflows/rest" - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - module Workflows - end - end - end - end -end - -helper_path = ::File.join __dir__, "workflows", "helpers.rb" -require "google/cloud/workflows/v1beta/workflows/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb deleted file mode 100644 index 9d115ffa4047..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/client.rb +++ /dev/null @@ -1,952 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/workflows/v1beta/workflows_pb" -require "google/cloud/location" - -module Google - module Cloud - module Workflows - module V1beta - module Workflows - ## - # Client for the Workflows service. - # - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workflows_stub - - ## - # Configure the Workflows Client class. - # - # See {::Google::Cloud::Workflows::V1beta::Workflows::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Workflows clients - # ::Google::Cloud::Workflows::V1beta::Workflows::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workflows", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Workflows Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workflows::V1beta::Workflows::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @workflows_stub.universe_domain - end - - ## - # Create a new Workflows client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Workflows 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/workflows/v1beta/workflows_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 - - @workflows_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Workflows::V1beta::Workflows::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 - ) - - @workflows_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 = @workflows_stub.endpoint - config.universe_domain = @workflows_stub.universe_domain - config.logger = @workflows_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Workflows::V1beta::Workflows::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 - @workflows_stub.logger - end - - # Service calls - - ## - # Lists Workflows in a given project and location. - # The default order is not specified. - # - # @overload list_workflows(request, options = nil) - # Pass arguments to `list_workflows` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_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. Project and location from which the workflows should be listed. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Maximum number of workflows to return per call. The service may return - # fewer than this value. If the value is not specified, a default value of - # 500 will be used. The maximum permitted value is 1000 and values greater - # than 1000 will be coerced down to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListWorkflows` must - # match the call that provided the page token. - # @param filter [::String] - # Filter to restrict results to specific workflows. - # @param order_by [::String] - # Comma-separated list of fields that that specify the order of the results. - # Default sorting order for a field is ascending. To specify descending order - # for a field, append a " desc" suffix. - # If not specified, the results will be returned in an unspecified order. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1beta::Workflow>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workflows::V1beta::Workflow>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new - # - # # Call the list_workflows method. - # result = client.list_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::Workflows::V1beta::Workflow. - # p item - # end - # - def list_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_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::Workflows::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_workflows.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :list_workflows, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workflows_stub, :list_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 - - ## - # Gets details of a single Workflow. - # - # @overload get_workflow(request, options = nil) - # Pass arguments to `get_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::GetWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workflow(name: nil) - # Pass arguments to `get_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. Name of the workflow which information should be retrieved. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workflows::V1beta::Workflow] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workflows::V1beta::Workflow] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new - # - # # Call the get_workflow method. - # result = client.get_workflow request - # - # # The returned object is of type Google::Cloud::Workflows::V1beta::Workflow. - # p result - # - def get_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_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::Workflows::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_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :get_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 - - ## - # Creates a new workflow. If a workflow with the specified name already - # exists in the specified project and location, the long running operation - # will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - # - # @overload create_workflow(request, options = nil) - # Pass arguments to `create_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workflow(parent: nil, workflow: nil, workflow_id: nil) - # Pass arguments to `create_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. Project and location in which the workflow should be created. - # Format: projects/\\{project}/locations/\\{location} - # @param workflow [::Google::Cloud::Workflows::V1beta::Workflow, ::Hash] - # Required. Workflow to be created. - # @param workflow_id [::String] - # Required. The ID of the workflow to be created. It has to fulfill the - # following requirements: - # - # * Must contain only letters, numbers, underscores and hyphens. - # * Must start with a letter. - # * Must be between 1-64 characters. - # * Must end with a number or a letter. - # * Must be unique within the customer project and 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/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new - # - # # Call the create_workflow method. - # result = client.create_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_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::Workflows::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_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :create_workflow, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 workflow with the specified name. - # This method also cancels and deletes all running executions of the - # workflow. - # - # @overload delete_workflow(request, options = nil) - # Pass arguments to `delete_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workflow(name: nil) - # Pass arguments to `delete_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. Name of the workflow to be deleted. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new - # - # # Call the delete_workflow method. - # result = client.delete_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_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::Workflows::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_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :delete_workflow, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 workflow. - # Running this method has no impact on already running executions of the - # workflow. A new revision of the workflow may be created as a result of a - # successful update operation. In that case, such revision will be used - # in new workflow executions. - # - # @overload update_workflow(request, options = nil) - # Pass arguments to `update_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workflow(workflow: nil, update_mask: nil) - # Pass arguments to `update_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 workflow [::Google::Cloud::Workflows::V1beta::Workflow, ::Hash] - # Required. Workflow to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields to be updated. If not present, the entire workflow - # will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new - # - # # Call the update_workflow method. - # result = client.update_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_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::Workflows::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.workflow&.name - header_params["workflow.name"] = request.workflow.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_workflow.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.call_rpc :update_workflow, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 Workflows API. - # - # This class represents the configuration for Workflows, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Workflows::V1beta::Workflows::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_workflows to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workflows::V1beta::Workflows::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_workflows.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_workflows.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Workflows::V1beta::Workflows::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflows.googleapis.com" - - config_attr :endpoint, nil, ::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 Workflows API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workflows - ## - # RPC-specific configuration for `get_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workflow - ## - # RPC-specific configuration for `create_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workflow - ## - # RPC-specific configuration for `delete_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workflow - ## - # RPC-specific configuration for `update_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workflow - - # @private - def initialize parent_rpcs = nil - list_workflows_config = parent_rpcs.list_workflows if parent_rpcs.respond_to? :list_workflows - @list_workflows = ::Gapic::Config::Method.new list_workflows_config - get_workflow_config = parent_rpcs.get_workflow if parent_rpcs.respond_to? :get_workflow - @get_workflow = ::Gapic::Config::Method.new get_workflow_config - create_workflow_config = parent_rpcs.create_workflow if parent_rpcs.respond_to? :create_workflow - @create_workflow = ::Gapic::Config::Method.new create_workflow_config - delete_workflow_config = parent_rpcs.delete_workflow if parent_rpcs.respond_to? :delete_workflow - @delete_workflow = ::Gapic::Config::Method.new delete_workflow_config - update_workflow_config = parent_rpcs.update_workflow if parent_rpcs.respond_to? :update_workflow - @update_workflow = ::Gapic::Config::Method.new update_workflow_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/credentials.rb deleted file mode 100644 index 550b00fccd1b..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/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 Workflows - module V1beta - module Workflows - # Credentials for the Workflows API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "WORKFLOWS_CREDENTIALS", - "WORKFLOWS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "WORKFLOWS_CREDENTIALS_JSON", - "WORKFLOWS_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-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb deleted file mode 100644 index 7011dce23d65..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Workflows - module V1beta - module Workflows - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Workflows 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 Workflows 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::Workflows::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::Workflows::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::Workflows::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::Workflows::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::Workflows::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflows.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/paths.rb deleted file mode 100644 index 8e6d9fdd43a9..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/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 Workflows - module V1beta - module Workflows - # Path helper methods for the Workflows 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 Workflow 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 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 diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest.rb deleted file mode 100644 index c806faf98cba..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/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/workflows/v1beta/version" -require "google/cloud/workflows/v1beta/bindings_override" - -require "google/cloud/workflows/v1beta/workflows/credentials" -require "google/cloud/workflows/v1beta/workflows/paths" -require "google/cloud/workflows/v1beta/workflows/rest/operations" -require "google/cloud/workflows/v1beta/workflows/rest/client" - -module Google - module Cloud - module Workflows - module V1beta - ## - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/workflows/v1beta/workflows/rest" - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - module Workflows - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/workflows/v1beta/workflows/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb deleted file mode 100644 index 129d779d0741..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/client.rb +++ /dev/null @@ -1,882 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/errors" -require "google/cloud/workflows/v1beta/workflows_pb" -require "google/cloud/workflows/v1beta/workflows/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Workflows - module V1beta - module Workflows - module Rest - ## - # REST client for the Workflows service. - # - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workflows_stub - - ## - # Configure the Workflows Client class. - # - # See {::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Workflows clients - # ::Google::Cloud::Workflows::V1beta::Workflows::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", "Workflows", "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 - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Workflows Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workflows::V1beta::Workflows::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 - @workflows_stub.universe_domain - end - - ## - # Create a new Workflows REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Workflows 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::Workflows::V1beta::Workflows::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 - - @workflows_stub = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @workflows_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 = @workflows_stub.endpoint - config.universe_domain = @workflows_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @workflows_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Workflows::V1beta::Workflows::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 - @workflows_stub.logger - end - - # Service calls - - ## - # Lists Workflows in a given project and location. - # The default order is not specified. - # - # @overload list_workflows(request, options = nil) - # Pass arguments to `list_workflows` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workflows(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_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. Project and location from which the workflows should be listed. - # Format: projects/\\{project}/locations/\\{location} - # @param page_size [::Integer] - # Maximum number of workflows to return per call. The service may return - # fewer than this value. If the value is not specified, a default value of - # 500 will be used. The maximum permitted value is 1000 and values greater - # than 1000 will be coerced down to 1000. - # @param page_token [::String] - # A page token, received from a previous `ListWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListWorkflows` must - # match the call that provided the page token. - # @param filter [::String] - # Filter to restrict results to specific workflows. - # @param order_by [::String] - # Comma-separated list of fields that that specify the order of the results. - # Default sorting order for a field is ascending. To specify descending order - # for a field, append a " desc" suffix. - # If not specified, the results will be returned in an unspecified order. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1beta::Workflow>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workflows::V1beta::Workflow>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new - # - # # Call the list_workflows method. - # result = client.list_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::Workflows::V1beta::Workflow. - # p item - # end - # - def list_workflows request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_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::Workflows::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_workflows.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workflows.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.list_workflows request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workflows_stub, :list_workflows, "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 - - ## - # Gets details of a single Workflow. - # - # @overload get_workflow(request, options = nil) - # Pass arguments to `get_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::GetWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workflow(name: nil) - # Pass arguments to `get_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. Name of the workflow which information should be retrieved. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::V1beta::Workflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::V1beta::Workflow] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new - # - # # Call the get_workflow method. - # result = client.get_workflow request - # - # # The returned object is of type Google::Cloud::Workflows::V1beta::Workflow. - # p result - # - def get_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_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::Workflows::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_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.get_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 - - ## - # Creates a new workflow. If a workflow with the specified name already - # exists in the specified project and location, the long running operation - # will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - # - # @overload create_workflow(request, options = nil) - # Pass arguments to `create_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workflow(parent: nil, workflow: nil, workflow_id: nil) - # Pass arguments to `create_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. Project and location in which the workflow should be created. - # Format: projects/\\{project}/locations/\\{location} - # @param workflow [::Google::Cloud::Workflows::V1beta::Workflow, ::Hash] - # Required. Workflow to be created. - # @param workflow_id [::String] - # Required. The ID of the workflow to be created. It has to fulfill the - # following requirements: - # - # * Must contain only letters, numbers, underscores and hyphens. - # * Must start with a letter. - # * Must be between 1-64 characters. - # * Must end with a number or a letter. - # * Must be unique within the customer project and 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/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new - # - # # Call the create_workflow method. - # result = client.create_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest - - # Converts hash and nil to an 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_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::Workflows::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_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.create_workflow request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workflow with the specified name. - # This method also cancels and deletes all running executions of the - # workflow. - # - # @overload delete_workflow(request, options = nil) - # Pass arguments to `delete_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workflow(name: nil) - # Pass arguments to `delete_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. Name of the workflow to be deleted. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new - # - # # Call the delete_workflow method. - # result = client.delete_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_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::Workflows::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_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.delete_workflow request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workflow. - # Running this method has no impact on already running executions of the - # workflow. A new revision of the workflow may be created as a result of a - # successful update operation. In that case, such revision will be used - # in new workflow executions. - # - # @overload update_workflow(request, options = nil) - # Pass arguments to `update_workflow` via a request object, either of type - # {::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workflow(workflow: nil, update_mask: nil) - # Pass arguments to `update_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 workflow [::Google::Cloud::Workflows::V1beta::Workflow, ::Hash] - # Required. Workflow to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # List of fields to be updated. If not present, the entire workflow - # will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workflows/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new - # - # # Call the update_workflow method. - # result = client.update_workflow request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workflow request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_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::Workflows::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workflow.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workflow.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workflows_stub.update_workflow request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 Workflows REST API. - # - # This class represents the configuration for Workflows 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::Workflows::V1beta::Workflows::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_workflows to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_workflows.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_workflows.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflows.googleapis.com" - - config_attr :endpoint, nil, ::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 Workflows API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_workflows` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workflows - ## - # RPC-specific configuration for `get_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workflow - ## - # RPC-specific configuration for `create_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workflow - ## - # RPC-specific configuration for `delete_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workflow - ## - # RPC-specific configuration for `update_workflow` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workflow - - # @private - def initialize parent_rpcs = nil - list_workflows_config = parent_rpcs.list_workflows if parent_rpcs.respond_to? :list_workflows - @list_workflows = ::Gapic::Config::Method.new list_workflows_config - get_workflow_config = parent_rpcs.get_workflow if parent_rpcs.respond_to? :get_workflow - @get_workflow = ::Gapic::Config::Method.new get_workflow_config - create_workflow_config = parent_rpcs.create_workflow if parent_rpcs.respond_to? :create_workflow - @create_workflow = ::Gapic::Config::Method.new create_workflow_config - delete_workflow_config = parent_rpcs.delete_workflow if parent_rpcs.respond_to? :delete_workflow - @delete_workflow = ::Gapic::Config::Method.new delete_workflow_config - update_workflow_config = parent_rpcs.update_workflow if parent_rpcs.respond_to? :update_workflow - @update_workflow = ::Gapic::Config::Method.new update_workflow_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb deleted file mode 100644 index f7964defcdb0..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Workflows - module V1beta - module Workflows - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workflows.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Workflows 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 Workflows 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::Workflows::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::Workflows::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::Workflows::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::Workflows::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workflows.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/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: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/rest/service_stub.rb deleted file mode 100644 index 2b77bde101f9..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows/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/workflows/v1beta/workflows_pb" - -module Google - module Cloud - module Workflows - module V1beta - module Workflows - module Rest - ## - # REST service stub for the Workflows 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_workflows REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse] - # A result object deserialized from the server's reply - def list_workflows request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_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_workflows", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workflows::V1beta::Workflow] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workflows::V1beta::Workflow] - # A result object deserialized from the server's reply - def get_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_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_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workflows::V1beta::Workflow.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_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_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_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_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_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workflow request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_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: "update_workflow", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - 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_workflows REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workflows_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/workflows", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::GetWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest] - # 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_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/workflows", - body: "workflow", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workflow REST call - # - # @param request_pb [::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workflow_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{workflow.name}", - body: "workflow", - matches: [ - ["workflow.name", %r{^projects/[^/]+/locations/[^/]+/workflows/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb deleted file mode 100644 index 3f5d16f5f421..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/workflows/v1beta/workflows.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/workflows/v1beta/workflows.proto\x12\x1dgoogle.cloud.workflows.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 google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x04\n\x08Workflow\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x41\n\x05state\x18\x03 \x01(\x0e\x32-.google.cloud.workflows.v1beta.Workflow.StateB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12=\n\x14revision_create_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x08 \x03(\x0b\x32\x33.google.cloud.workflows.v1beta.Workflow.LabelsEntry\x12\x17\n\x0fservice_account\x18\t \x01(\t\x12\x19\n\x0fsource_contents\x18\n \x01(\tH\x00\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"*\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01:d\xea\x41\x61\n!workflows.googleapis.com/Workflow\x12\n\x08workflow\x18\x02 \x01(\x0b\x32\'.google.cloud.workflows.v1beta.WorkflowB\x03\xe0\x41\x02\x12\x18\n\x0bworkflow_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"P\n\x15\x44\x65leteWorkflowRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!workflows.googleapis.com/Workflow\"\x88\x01\n\x15UpdateWorkflowRequest\x12>\n\x08workflow\x18\x01 \x01(\x0b\x32\'.google.cloud.workflows.v1beta.WorkflowB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xa5\x01\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x13\n\x0b\x61pi_version\x18\x05 \x01(\t2\xf9\x08\n\tWorkflows\x12\xbe\x01\n\rListWorkflows\x12\x33.google.cloud.workflows.v1beta.ListWorkflowsRequest\x1a\x34.google.cloud.workflows.v1beta.ListWorkflowsResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1beta/{parent=projects/*/locations/*}/workflows\x12\xab\x01\n\x0bGetWorkflow\x12\x31.google.cloud.workflows.v1beta.GetWorkflowRequest\x1a\'.google.cloud.workflows.v1beta.Workflow\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1beta/{name=projects/*/locations/*/workflows/*}\x12\xe9\x01\n\x0e\x43reateWorkflow\x12\x34.google.cloud.workflows.v1beta.CreateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\xda\x41\x1bparent,workflow,workflow_id\x82\xd3\xe4\x93\x02=\"1/v1beta/{parent=projects/*/locations/*}/workflows:\x08workflow\x12\xd4\x01\n\x0e\x44\x65leteWorkflow\x12\x34.google.cloud.workflows.v1beta.DeleteWorkflowRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1beta/{name=projects/*/locations/*/workflows/*}\x12\xeb\x01\n\x0eUpdateWorkflow\x12\x34.google.cloud.workflows.v1beta.UpdateWorkflowRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1d\n\x08Workflow\x12\x11OperationMetadata\xda\x41\x14workflow,update_mask\x82\xd3\xe4\x93\x02\x46\x32:/v1beta/{workflow.name=projects/*/locations/*/workflows/*}:\x08workflow\x1aL\xca\x41\x18workflows.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformBv\n!com.google.cloud.workflows.v1betaB\x0eWorkflowsProtoP\x01Z?cloud.google.com/go/workflows/apiv1beta/workflowspb;workflowspbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Workflows - module V1beta - Workflow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.Workflow").msgclass - Workflow::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.Workflow.State").enummodule - ListWorkflowsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.ListWorkflowsRequest").msgclass - ListWorkflowsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.ListWorkflowsResponse").msgclass - GetWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.GetWorkflowRequest").msgclass - CreateWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.CreateWorkflowRequest").msgclass - DeleteWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.DeleteWorkflowRequest").msgclass - UpdateWorkflowRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.UpdateWorkflowRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workflows.v1beta.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb b/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb deleted file mode 100644 index c6606ec7ea91..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/lib/google/cloud/workflows/v1beta/workflows_services_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/workflows/v1beta/workflows.proto for package 'google.cloud.workflows.v1beta' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/workflows/v1beta/workflows_pb' - -module Google - module Cloud - module Workflows - module V1beta - module Workflows - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.workflows.v1beta.Workflows' - - # Lists Workflows in a given project and location. - # The default order is not specified. - rpc :ListWorkflows, ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest, ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse - # Gets details of a single Workflow. - rpc :GetWorkflow, ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest, ::Google::Cloud::Workflows::V1beta::Workflow - # Creates a new workflow. If a workflow with the specified name already - # exists in the specified project and location, the long running operation - # will return [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS] error. - rpc :CreateWorkflow, ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest, ::Google::Longrunning::Operation - # Deletes a workflow with the specified name. - # This method also cancels and deletes all running executions of the - # workflow. - rpc :DeleteWorkflow, ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest, ::Google::Longrunning::Operation - # Updates an existing workflow. - # Running this method has no impact on already running executions of the - # workflow. A new revision of the workflow may be created as a result of a - # successful update operation. In that case, such revision will be used - # in new workflow executions. - rpc :UpdateWorkflow, ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/README.md deleted file mode 100644 index 00492e17dd69..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Workflows 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-workflows-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb deleted file mode 100644 index 51dd7e8cb940..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/cloud/workflows/v1beta/workflows.rb +++ /dev/null @@ -1,245 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Workflows - module V1beta - # Workflow program to be executed by Workflows. - # @!attribute [rw] name - # @return [::String] - # The resource name of the workflow. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - # @!attribute [rw] description - # @return [::String] - # Description of the workflow provided by the user. - # Must be at most 1000 unicode characters long. - # @!attribute [r] state - # @return [::Google::Cloud::Workflows::V1beta::Workflow::State] - # Output only. State of the workflow deployment. - # @!attribute [r] revision_id - # @return [::String] - # Output only. The revision of the workflow. - # A new revision of a workflow is created as a result of updating the - # following properties of a workflow: - # - # - {::Google::Cloud::Workflows::V1beta::Workflow#service_account Service account} - # - [Workflow code to be - # executed][google.cloud.workflows.v1beta.Workflow.source_contents] - # - # The format is "000001-a4d", where the first 6 characters define - # the zero-padded revision ordinal number. They are followed by a hyphen and - # 3 hexadecimal random characters. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of when the workflow was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of the workflow. - # @!attribute [r] revision_create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp that the latest revision of the workflow - # was created. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with this workflow. - # Labels can contain at most 64 entries. Keys and values can be no longer - # than 63 characters and can only contain lowercase letters, numeric - # characters, underscores and dashes. Label keys must start with a letter. - # International characters are allowed. - # @!attribute [rw] service_account - # @return [::String] - # The service account associated with the latest workflow version. - # This service account represents the identity of the workflow and determines - # what permissions the workflow has. - # Format: projects/\\{project}/serviceAccounts/\\{account} or \\{account} - # - # Using `-` as a wildcard for the `{project}` or not providing one at all - # will infer the project from the account. The `{account}` value can be the - # `email` address or the `unique_id` of the service account. - # - # If not provided, workflow will use the project's default service account. - # Modifying this field for an existing workflow results in a new workflow - # revision. - # @!attribute [rw] source_contents - # @return [::String] - # Workflow code to be executed. The size limit is 128KB. - class Workflow - 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 - - # Describes the current state of workflow deployment. More states may be - # added in the future. - module State - # Invalid state. - STATE_UNSPECIFIED = 0 - - # The workflow has been deployed successfully and is serving. - ACTIVE = 1 - end - end - - # Request for the - # {::Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows ListWorkflows} - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location from which the workflows should be listed. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of workflows to return per call. The service may return - # fewer than this value. If the value is not specified, a default value of - # 500 will be used. The maximum permitted value is 1000 and values greater - # than 1000 will be coerced down to 1000. - # @!attribute [rw] page_token - # @return [::String] - # A page token, received from a previous `ListWorkflows` call. - # Provide this to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListWorkflows` must - # match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Filter to restrict results to specific workflows. - # @!attribute [rw] order_by - # @return [::String] - # Comma-separated list of fields that that specify the order of the results. - # Default sorting order for a field is ascending. To specify descending order - # for a field, append a " desc" suffix. - # If not specified, the results will be returned in an unspecified order. - class ListWorkflowsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the - # {::Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows ListWorkflows} - # method. - # @!attribute [rw] workflows - # @return [::Array<::Google::Cloud::Workflows::V1beta::Workflow>] - # The workflows which match the request. - # @!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>] - # Unreachable resources. - class ListWorkflowsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::V1beta::Workflows::Client#get_workflow GetWorkflow} method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workflow which information should be retrieved. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - class GetWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::V1beta::Workflows::Client#create_workflow CreateWorkflow} - # method. - # @!attribute [rw] parent - # @return [::String] - # Required. Project and location in which the workflow should be created. - # Format: projects/\\{project}/locations/\\{location} - # @!attribute [rw] workflow - # @return [::Google::Cloud::Workflows::V1beta::Workflow] - # Required. Workflow to be created. - # @!attribute [rw] workflow_id - # @return [::String] - # Required. The ID of the workflow to be created. It has to fulfill the - # following requirements: - # - # * Must contain only letters, numbers, underscores and hyphens. - # * Must start with a letter. - # * Must be between 1-64 characters. - # * Must end with a number or a letter. - # * Must be unique within the customer project and location. - class CreateWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::V1beta::Workflows::Client#delete_workflow DeleteWorkflow} - # method. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workflow to be deleted. - # Format: projects/\\{project}/locations/\\{location}/workflows/\\{workflow} - class DeleteWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the - # {::Google::Cloud::Workflows::V1beta::Workflows::Client#update_workflow UpdateWorkflow} - # method. - # @!attribute [rw] workflow - # @return [::Google::Cloud::Workflows::V1beta::Workflow] - # Required. Workflow to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # List of fields to be updated. If not present, the entire workflow - # will be updated. - class UpdateWorkflowRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation was created. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation finished running. - # @!attribute [rw] target - # @return [::String] - # Server-defined resource path for the target of the operation. - # @!attribute [rw] verb - # @return [::String] - # Name of the verb executed by the operation. - # @!attribute [rw] api_version - # @return [::String] - # 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-workflows-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workflows-v1beta/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/Gemfile deleted file mode 100644 index 6d0b5707d9d1..000000000000 --- a/owl-bot-staging/google-cloud-workflows-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-workflows-v1beta", path: "../" -else - gem "google-cloud-workflows-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-workflows-v1beta/snippets/snippet_metadata_google.cloud.workflows.v1beta.json b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/snippet_metadata_google.cloud.workflows.v1beta.json deleted file mode 100644 index aa4ec480902e..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/snippet_metadata_google.cloud.workflows.v1beta.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-workflows-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.workflows.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "workflows_v1beta_generated_Workflows_ListWorkflows_sync", - "title": "Snippet for the list_workflows call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows.", - "file": "workflows/list_workflows.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workflows", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" - }, - "method": { - "short_name": "ListWorkflows", - "full_name": "google.cloud.workflows.v1beta.Workflows.ListWorkflows", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1beta.Workflows" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflows_v1beta_generated_Workflows_GetWorkflow_sync", - "title": "Snippet for the get_workflow call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#get_workflow.", - "file": "workflows/get_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workflow", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#get_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1beta::GetWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workflows::V1beta::Workflow", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" - }, - "method": { - "short_name": "GetWorkflow", - "full_name": "google.cloud.workflows.v1beta.Workflows.GetWorkflow", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1beta.Workflows" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflows_v1beta_generated_Workflows_CreateWorkflow_sync", - "title": "Snippet for the create_workflow call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#create_workflow.", - "file": "workflows/create_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workflow", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#create_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" - }, - "method": { - "short_name": "CreateWorkflow", - "full_name": "google.cloud.workflows.v1beta.Workflows.CreateWorkflow", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1beta.Workflows" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflows_v1beta_generated_Workflows_DeleteWorkflow_sync", - "title": "Snippet for the delete_workflow call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#delete_workflow.", - "file": "workflows/delete_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workflow", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#delete_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" - }, - "method": { - "short_name": "DeleteWorkflow", - "full_name": "google.cloud.workflows.v1beta.Workflows.DeleteWorkflow", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1beta.Workflows" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workflows_v1beta_generated_Workflows_UpdateWorkflow_sync", - "title": "Snippet for the update_workflow call in the Workflows service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workflows::V1beta::Workflows::Client#update_workflow.", - "file": "workflows/update_workflow.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workflow", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client#update_workflow", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workflows::Client", - "full_name": "::Google::Cloud::Workflows::V1beta::Workflows::Client" - }, - "method": { - "short_name": "UpdateWorkflow", - "full_name": "google.cloud.workflows.v1beta.Workflows.UpdateWorkflow", - "service": { - "short_name": "Workflows", - "full_name": "google.cloud.workflows.v1beta.Workflows" - } - } - }, - "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-workflows-v1beta/snippets/workflows/create_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.rb deleted file mode 100644 index 8b8c1e929159..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/create_workflow.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 workflows_v1beta_generated_Workflows_CreateWorkflow_sync] -require "google/cloud/workflows/v1beta" - -## -# Snippet for the create_workflow call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1beta::Workflows::Client#create_workflow. -# -def create_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new - - # Call the create_workflow method. - result = client.create_workflow request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workflows_v1beta_generated_Workflows_CreateWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.rb deleted file mode 100644 index 95eaf09e0e6f..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/delete_workflow.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 workflows_v1beta_generated_Workflows_DeleteWorkflow_sync] -require "google/cloud/workflows/v1beta" - -## -# Snippet for the delete_workflow call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1beta::Workflows::Client#delete_workflow. -# -def delete_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new - - # Call the delete_workflow method. - result = client.delete_workflow request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workflows_v1beta_generated_Workflows_DeleteWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/get_workflow.rb deleted file mode 100644 index 8d629d661011..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/get_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 workflows_v1beta_generated_Workflows_GetWorkflow_sync] -require "google/cloud/workflows/v1beta" - -## -# Snippet for the get_workflow call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1beta::Workflows::Client#get_workflow. -# -def get_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new - - # Call the get_workflow method. - result = client.get_workflow request - - # The returned object is of type Google::Cloud::Workflows::V1beta::Workflow. - p result -end -# [END workflows_v1beta_generated_Workflows_GetWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/list_workflows.rb deleted file mode 100644 index 0ed09a7616d6..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/list_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 workflows_v1beta_generated_Workflows_ListWorkflows_sync] -require "google/cloud/workflows/v1beta" - -## -# Snippet for the list_workflows call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1beta::Workflows::Client#list_workflows. -# -def list_workflows - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new - - # Call the list_workflows method. - result = client.list_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::Workflows::V1beta::Workflow. - p item - end -end -# [END workflows_v1beta_generated_Workflows_ListWorkflows_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb b/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.rb deleted file mode 100644 index bab5a8ac4c65..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/snippets/workflows/update_workflow.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 workflows_v1beta_generated_Workflows_UpdateWorkflow_sync] -require "google/cloud/workflows/v1beta" - -## -# Snippet for the update_workflow call in the Workflows service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workflows::V1beta::Workflows::Client#update_workflow. -# -def update_workflow - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workflows::V1beta::Workflows::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new - - # Call the update_workflow method. - result = client.update_workflow request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workflows_v1beta_generated_Workflows_UpdateWorkflow_sync] diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_operations_test.rb deleted file mode 100644 index 7056811966a4..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_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/workflows/v1beta/workflows_pb" -require "google/cloud/workflows/v1beta/workflows_services_pb" -require "google/cloud/workflows/v1beta/workflows" - -class ::Google::Cloud::Workflows::V1beta::Workflows::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_paths_test.rb deleted file mode 100644 index 79297ed7cc4c..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_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/workflows/v1beta/workflows" - -class ::Google::Cloud::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::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_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::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.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-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_rest_test.rb deleted file mode 100644 index b88805f29aeb..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_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/workflows/v1beta/workflows_pb" -require "google/cloud/workflows/v1beta/workflows/rest" - - -class ::Google::Cloud::Workflows::V1beta::Workflows::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_workflows - # Create test objects. - client_result = ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse.new - http_response = OpenStruct.new 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_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_list_workflows_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workflows_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workflows parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workflows ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workflows(::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.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_workflows_client_stub.call_count - end - end - end - - def test_get_workflow - # Create test objects. - client_result = ::Google::Cloud::Workflows::V1beta::Workflow.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_get_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workflow ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workflow(::Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workflow_client_stub.call_count - end - end - end - - def test_create_workflow - # Create test objects. - 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" - workflow = {} - workflow_id = "hello world" - - create_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_create_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workflow ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workflow(::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workflow_client_stub.call_count - end - end - end - - def test_delete_workflow - # Create test objects. - 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_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_delete_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workflow({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workflow name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workflow ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workflow({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workflow(::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workflow_client_stub.call_count - end - end - end - - def test_update_workflow - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workflow = {} - update_mask = {} - - update_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::Workflows::V1beta::Workflows::Rest::ServiceStub.stub :transcode_update_workflow_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workflow({ workflow: workflow, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workflow workflow: workflow, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workflow ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workflow({ workflow: workflow, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workflow(::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workflow_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::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb deleted file mode 100644 index b92f9a575774..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/test/google/cloud/workflows/v1beta/workflows_test.rb +++ /dev/null @@ -1,442 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workflows/v1beta/workflows_pb" -require "google/cloud/workflows/v1beta/workflows" - -class ::Google::Cloud::Workflows::V1beta::Workflows::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_workflows - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::V1beta::ListWorkflowsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workflows_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workflows, name - assert_kind_of ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest, 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_workflows_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workflows parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workflows ::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workflows({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workflows(::Google::Cloud::Workflows::V1beta::ListWorkflowsRequest.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_workflows_client_stub.call_rpc_count - end - end - - def test_get_workflow - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workflows::V1beta::Workflow.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workflow, name - assert_kind_of ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workflow({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workflow name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workflow ::Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workflow({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workflow(::Google::Cloud::Workflows::V1beta::GetWorkflowRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workflow_client_stub.call_rpc_count - end - end - - def test_create_workflow - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workflow = {} - workflow_id = "hello world" - - create_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workflow, name - assert_kind_of ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::V1beta::Workflow), request["workflow"] - assert_equal "hello world", request["workflow_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workflow parent: parent, workflow: workflow, workflow_id: workflow_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workflow ::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workflow({ parent: parent, workflow: workflow, workflow_id: workflow_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workflow(::Google::Cloud::Workflows::V1beta::CreateWorkflowRequest.new(parent: parent, workflow: workflow, workflow_id: workflow_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_workflow_client_stub.call_rpc_count - end - end - - def test_delete_workflow - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workflow, name - assert_kind_of ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workflow({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workflow name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workflow ::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workflow({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workflow(::Google::Cloud::Workflows::V1beta::DeleteWorkflowRequest.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_workflow_client_stub.call_rpc_count - end - end - - def test_update_workflow - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workflow = {} - update_mask = {} - - update_workflow_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workflow, name - assert_kind_of ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workflows::V1beta::Workflow), request["workflow"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workflow_client_stub do - # Create client - client = ::Google::Cloud::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workflow({ workflow: workflow, update_mask: update_mask }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_workflow workflow: workflow, update_mask: update_mask do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_workflow ::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new(workflow: workflow, update_mask: update_mask) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_workflow({ workflow: workflow, update_mask: update_mask }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_workflow(::Google::Cloud::Workflows::V1beta::UpdateWorkflowRequest.new(workflow: workflow, 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_workflow_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::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Workflows::V1beta::Workflows::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::Workflows::V1beta::Workflows::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Workflows::V1beta::Workflows::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-workflows-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.gitignore b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.repo-metadata.json deleted file mode 100644 index 6f86f03223ce..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "workflowexecutions.googleapis.com", - "api_shortname": "workflowexecutions", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions/latest", - "distribution_name": "google-cloud-workflows-executions", - "is_cloud": true, - "language": "ruby", - "name": "workflowexecutions", - "name_pretty": "Workflows Executions API", - "product_documentation": "https://cloud.google.com/workflows/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.", - "ruby-cloud-env-prefix": "WORKFLOWS", - "ruby-cloud-product-url": "https://cloud.google.com/workflows/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.rubocop.yml b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.rubocop.yml deleted file mode 100644 index 903242f65cea..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workflows-executions.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-cloud-workflows-executions.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.toys.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.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-workflows/google-cloud-workflows-executions/.yardopts b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.yardopts deleted file mode 100644 index d07738816489..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Workflows Executions API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/AUTHENTICATION.md deleted file mode 100644 index 185bed90df18..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workflows-executions 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-workflows-executions 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/workflows/executions" - -client = Google::Cloud::Workflows::Executions.executions do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workflows/executions" - -Google::Cloud::Workflows::Executions.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Workflows::Executions.executions -``` - -### 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-workflows-executions -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/workflows/executions" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Workflows::Executions.executions -``` - -### 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-workflows/google-cloud-workflows-executions/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Gemfile b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Gemfile deleted file mode 100644 index 90ad7598b189..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-workflows-executions-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-workflows-executions.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/LICENSE.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/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-workflows/google-cloud-workflows-executions/README.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/README.md deleted file mode 100644 index f3b71237b9d7..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Workflows Executions API - -API Client library for the Workflows Executions API - -Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-workflows-executions-v*`. -The gem `google-cloud-workflows-executions` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions/latest) -for this library, google-cloud-workflows-executions, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-workflows-executions-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/workflows/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-workflows-executions -``` - -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/workflowexecutions.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/workflows/executions" - -client = Google::Cloud::Workflows::Executions.executions -request = ::Google::Cloud::Workflows::Executions::V1::ListExecutionsRequest.new # (request fields as keyword arguments...) -response = client.list_executions request -``` - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-workflows-executions-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workflows-executions`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workflows-executions-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-workflows-executions`. -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-workflows-executions-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-workflows/google-cloud-workflows-executions/Rakefile b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Rakefile deleted file mode 100644 index 5c9ac364bc2a..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-workflows-executions acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WORKFLOWS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WORKFLOWS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/workflows/executions/v1/executions/credentials" - ::Google::Cloud::Workflows::Executions::V1::Executions::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WORKFLOWS_PROJECT"] = project - ENV["WORKFLOWS_TEST_PROJECT"] = project - ENV["WORKFLOWS_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-workflows-executions 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-workflows-executions 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-workflows-executions 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-workflows-executions gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workflows-executions" - header "google-cloud-workflows-executions rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workflows-executions yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workflows-executions 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-workflows-executions 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-workflows-executions 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-workflows/google-cloud-workflows-executions/google-cloud-workflows-executions.gemspec b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/google-cloud-workflows-executions.gemspec deleted file mode 100644 index 412cb0c6ff5f..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/google-cloud-workflows-executions.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workflows/executions/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workflows-executions" - gem.version = Google::Cloud::Workflows::Executions::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero." - gem.summary = "API Client library for the Workflows Executions API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-workflows-executions-v1", "~> 1.2" -end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google-cloud-workflows-executions.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google-cloud-workflows-executions.rb deleted file mode 100644 index 13c530a8e067..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google-cloud-workflows-executions.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workflows/executions" unless defined? Google::Cloud::Workflows::Executions::VERSION diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions.rb deleted file mode 100644 index f5c8e2a49537..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions.rb +++ /dev/null @@ -1,150 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/workflows/executions/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :workflows_executions do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Workflows - module Executions - ## - # Create a new client object for Executions. - # - # By default, this returns an instance of - # [Google::Cloud::Workflows::Executions::V1::Executions::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-executions-v1/latest/Google-Cloud-Workflows-Executions-V1-Executions-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Executions service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the Executions service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Workflows::Executions.executions_available?}. - # - # ## About Executions - # - # Executions is used to start and manage running instances of - # [Workflows][google.cloud.workflows.v1.Workflow] called executions. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @return [::Object] A client object for the specified version. - # - def self.executions version: :v1, &block - require "google/cloud/workflows/executions/#{version.to_s.downcase}" - - package_name = Google::Cloud::Workflows::Executions - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Workflows::Executions.const_get(package_name).const_get(:Executions) - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Executions service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Workflows::Executions.executions}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Executions service, - # or if the versioned client gem needs an update to support the Executions service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @return [boolean] Whether the service is available. - # - def self.executions_available? version: :v1 - require "google/cloud/workflows/executions/#{version.to_s.downcase}" - package_name = Google::Cloud::Workflows::Executions - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Workflows::Executions.const_get package_name - return false unless service_module.const_defined? :Executions - service_module = service_module.const_get :Executions - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-workflows-executions library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.workflows_executions if block_given? - - ::Google::Cloud.configure.workflows_executions - end - end - end - end -end - -helper_path = ::File.join __dir__, "executions", "helpers.rb" -require "google/cloud/workflows/executions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions/version.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions/version.rb deleted file mode 100644 index c22a678f1256..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/lib/google/cloud/workflows/executions/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 Workflows - module Executions - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/client_test.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/client_test.rb deleted file mode 100644 index 0a97f964751a..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/client_test.rb +++ /dev/null @@ -1,53 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/workflows/executions" -require "gapic/common" -require "gapic/grpc" - -class Google::Cloud::Workflows::Executions::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_executions_grpc - skip unless Google::Cloud::Workflows::Executions.executions_available? - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Workflows::Executions.executions do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Workflows::Executions::V1::Executions::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/version_test.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/version_test.rb deleted file mode 100644 index 128c4ab2b101..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/google/cloud/workflows/executions/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/workflows/executions/version" - -class Google::Cloud::Workflows::Executions::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Workflows::Executions::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/helper.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows-executions/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.gitignore b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.repo-metadata.json b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.repo-metadata.json deleted file mode 100644 index d25673438688..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "workflows.googleapis.com", - "api_shortname": "workflows", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workflows/latest", - "distribution_name": "google-cloud-workflows", - "is_cloud": true, - "language": "ruby", - "name": "workflows", - "name_pretty": "Workflows API", - "product_documentation": "https://cloud.google.com/workflows/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero.", - "ruby-cloud-env-prefix": "WORKFLOWS", - "ruby-cloud-product-url": "https://cloud.google.com/workflows/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.rubocop.yml b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.rubocop.yml deleted file mode 100644 index e82312dde04e..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workflows.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-cloud-workflows.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.toys.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.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-workflows/google-cloud-workflows/.yardopts b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.yardopts deleted file mode 100644 index 88d4652bb1ad..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Workflows API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/AUTHENTICATION.md deleted file mode 100644 index 31c743cfb7ed..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workflows 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-workflows 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/workflows" - -client = Google::Cloud::Workflows.workflows do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workflows" - -Google::Cloud::Workflows.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Workflows.workflows -``` - -### 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-workflows -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/workflows" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Workflows.workflows -``` - -### 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-workflows/google-cloud-workflows/CHANGELOG.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Gemfile b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Gemfile deleted file mode 100644 index 57a61b552e9a..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-workflows-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-workflows.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/LICENSE.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/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-workflows/google-cloud-workflows/README.md b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/README.md deleted file mode 100644 index d0cb1aef1d2a..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Workflows API - -API Client library for the Workflows API - -Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-workflows-v*`. -The gem `google-cloud-workflows` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows/latest) -for this library, google-cloud-workflows, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-workflows-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/workflows/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-workflows -``` - -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/workflows.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/workflows" - -client = Google::Cloud::Workflows.workflows -request = ::Google::Cloud::Workflows::V1::ListWorkflowsRequest.new # (request fields as keyword arguments...) -response = client.list_workflows request -``` - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-workflows-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workflows`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workflows-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-workflows`. -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-workflows-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-workflows/google-cloud-workflows/Rakefile b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Rakefile deleted file mode 100644 index c99eee2c3b08..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-workflows acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["WORKFLOWS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["WORKFLOWS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["WORKFLOWS_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 WORKFLOWS_TEST_PROJECT=test123 WORKFLOWS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/workflows/v1/workflows/credentials" - ::Google::Cloud::Workflows::V1::Workflows::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["WORKFLOWS_PROJECT"] = project - ENV["WORKFLOWS_TEST_PROJECT"] = project - ENV["WORKFLOWS_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-workflows 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-workflows 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-workflows 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-workflows gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workflows" - header "google-cloud-workflows rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workflows yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workflows 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-workflows 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-workflows 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-workflows/google-cloud-workflows/google-cloud-workflows.gemspec b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/google-cloud-workflows.gemspec deleted file mode 100644 index 8c487d94c4d4..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/google-cloud-workflows.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workflows/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workflows" - gem.version = Google::Cloud::Workflows::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Workflows link series of serverless tasks together in an order you define. Combine the power of Google Cloud's APIs, serverless products like Cloud Functions and Cloud Run, and calls to external APIs to create flexible serverless applications. Workflows requires no infrastructure management and scales seamlessly with demand, including scaling down to zero." - gem.summary = "API Client library for the Workflows API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-workflows-v1", "~> 2.0" -end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google-cloud-workflows.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google-cloud-workflows.rb deleted file mode 100644 index adabd9392337..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google-cloud-workflows.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workflows" unless defined? Google::Cloud::Workflows::VERSION diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows.rb deleted file mode 100644 index 33e14a2ff7c7..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows.rb +++ /dev/null @@ -1,158 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/workflows/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :workflows do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Workflows - ## - # Create a new client object for Workflows. - # - # By default, this returns an instance of - # [Google::Cloud::Workflows::V1::Workflows::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-workflows-v1/latest/Google-Cloud-Workflows-V1-Workflows-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Workflows service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Workflows service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Workflows.workflows_available?}. - # - # ## About Workflows - # - # Workflows is used to deploy and execute workflow programs. - # Workflows makes sure the program executes reliably, despite hardware and - # networking interruptions. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.workflows version: :v1, transport: :grpc, &block - require "google/cloud/workflows/#{version.to_s.downcase}" - - package_name = Google::Cloud::Workflows - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Workflows.const_get(package_name).const_get(:Workflows) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Workflows service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Workflows.workflows}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Workflows service, - # or if the versioned client gem needs an update to support the Workflows service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.workflows_available? version: :v1, transport: :grpc - require "google/cloud/workflows/#{version.to_s.downcase}" - package_name = Google::Cloud::Workflows - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Workflows.const_get package_name - return false unless service_module.const_defined? :Workflows - service_module = service_module.const_get :Workflows - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-workflows library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.workflows if block_given? - - ::Google::Cloud.configure.workflows - end - end - end -end - -helper_path = ::File.join __dir__, "workflows", "helpers.rb" -require "google/cloud/workflows/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows/version.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows/version.rb deleted file mode 100644 index cf67bb79b7d9..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/lib/google/cloud/workflows/version.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Workflows - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/client_test.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/client_test.rb deleted file mode 100644 index e37935a25dde..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/workflows" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Workflows::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_workflows_grpc - skip unless Google::Cloud::Workflows.workflows_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Workflows.workflows transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Workflows::V1::Workflows::Client, client - end - end - - def test_workflows_rest - skip unless Google::Cloud::Workflows.workflows_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Workflows.workflows transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Workflows::V1::Workflows::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/version_test.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/version_test.rb deleted file mode 100644 index b7640f8afba5..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/google/cloud/workflows/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/workflows/version" - -class Google::Cloud::Workflows::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Workflows::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/helper.rb b/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-workflows/google-cloud-workflows/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1/.gitignore b/owl-bot-staging/google-cloud-workstations-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workstations-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-workstations-v1/.repo-metadata.json deleted file mode 100644 index 45c35fe5368d..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "workstations.googleapis.com", - "api_shortname": "workstations", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest", - "distribution_name": "google-cloud-workstations-v1", - "is_cloud": true, - "language": "ruby", - "name": "workstations", - "name_pretty": "Cloud Workstations V1 API", - "product_documentation": "https://cloud.google.com/workstations/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Allows administrators to create managed developer environments in the cloud. Note that google-cloud-workstations-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workstations instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/workstations/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workstations-v1/.rubocop.yml b/owl-bot-staging/google-cloud-workstations-v1/.rubocop.yml deleted file mode 100644 index a44551c617b3..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workstations-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-workstations-v1.rb" diff --git a/owl-bot-staging/google-cloud-workstations-v1/.toys.rb b/owl-bot-staging/google-cloud-workstations-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/.yardopts b/owl-bot-staging/google-cloud-workstations-v1/.yardopts deleted file mode 100644 index 2d5ddbfd78ca..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Workstations 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-workstations-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workstations-v1/AUTHENTICATION.md deleted file mode 100644 index f69ad9397007..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workstations-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-workstations-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/workstations/v1" - -client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workstations/v1" - -::Google::Cloud::Workstations::V1::Workstations::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Workstations::V1::Workstations::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-workstations-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/workstations/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Workstations::V1::Workstations::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-workstations-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-workstations-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workstations-v1/Gemfile b/owl-bot-staging/google-cloud-workstations-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workstations-v1/LICENSE.md b/owl-bot-staging/google-cloud-workstations-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/README.md b/owl-bot-staging/google-cloud-workstations-v1/README.md deleted file mode 100644 index a82b29f2a4e7..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Workstations V1 API - -Allows administrators to create managed developer environments in the 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 Cloud Workstations V1 API. Most users should consider using -the main client gem, -[google-cloud-workstations](https://rubygems.org/gems/google-cloud-workstations). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-workstations-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/workstations.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/workstations/v1" - -client = ::Google::Cloud::Workstations::V1::Workstations::Client.new -request = ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new # (request fields as keyword arguments...) -response = client.get_workstation_cluster request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/workstations/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/workstations/v1" -require "logger" - -client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workstations`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workstations-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-workstations`. -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-workstations-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-workstations-v1/Rakefile b/owl-bot-staging/google-cloud-workstations-v1/Rakefile deleted file mode 100644 index 2d6588091b1a..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-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/workstations/v1/workstations/credentials" - ::Google::Cloud::Workstations::V1::Workstations::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-workstations-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-workstations-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-workstations-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-workstations-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workstations-v1" - header "google-cloud-workstations-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workstations-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workstations-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-workstations-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-workstations-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-workstations-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-workstations-v1/gapic_metadata.json deleted file mode 100644 index 27954dcb3a8f..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/gapic_metadata.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.workstations.v1", - "libraryPackage": "::Google::Cloud::Workstations::V1", - "services": { - "Workstations": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Workstations::V1::Workstations::Client", - "rpcs": { - "GetWorkstationCluster": { - "methods": [ - "get_workstation_cluster" - ] - }, - "ListWorkstationClusters": { - "methods": [ - "list_workstation_clusters" - ] - }, - "CreateWorkstationCluster": { - "methods": [ - "create_workstation_cluster" - ] - }, - "UpdateWorkstationCluster": { - "methods": [ - "update_workstation_cluster" - ] - }, - "DeleteWorkstationCluster": { - "methods": [ - "delete_workstation_cluster" - ] - }, - "GetWorkstationConfig": { - "methods": [ - "get_workstation_config" - ] - }, - "ListWorkstationConfigs": { - "methods": [ - "list_workstation_configs" - ] - }, - "ListUsableWorkstationConfigs": { - "methods": [ - "list_usable_workstation_configs" - ] - }, - "CreateWorkstationConfig": { - "methods": [ - "create_workstation_config" - ] - }, - "UpdateWorkstationConfig": { - "methods": [ - "update_workstation_config" - ] - }, - "DeleteWorkstationConfig": { - "methods": [ - "delete_workstation_config" - ] - }, - "GetWorkstation": { - "methods": [ - "get_workstation" - ] - }, - "ListWorkstations": { - "methods": [ - "list_workstations" - ] - }, - "ListUsableWorkstations": { - "methods": [ - "list_usable_workstations" - ] - }, - "CreateWorkstation": { - "methods": [ - "create_workstation" - ] - }, - "UpdateWorkstation": { - "methods": [ - "update_workstation" - ] - }, - "DeleteWorkstation": { - "methods": [ - "delete_workstation" - ] - }, - "StartWorkstation": { - "methods": [ - "start_workstation" - ] - }, - "StopWorkstation": { - "methods": [ - "stop_workstation" - ] - }, - "GenerateAccessToken": { - "methods": [ - "generate_access_token" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-workstations-v1/google-cloud-workstations-v1.gemspec b/owl-bot-staging/google-cloud-workstations-v1/google-cloud-workstations-v1.gemspec deleted file mode 100644 index 673b80c09ed4..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/google-cloud-workstations-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workstations/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workstations-v1" - gem.version = Google::Cloud::Workstations::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Allows administrators to create managed developer environments in the cloud. Note that google-cloud-workstations-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workstations instead. See the readme for more details." - gem.summary = "Allows administrators to create managed developer environments in the cloud." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google-cloud-workstations-v1.rb deleted file mode 100644 index 5432da78d5cb..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google-cloud-workstations-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/workstations/v1" diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1.rb deleted file mode 100644 index 33d0c263a9f4..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/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/workstations/v1/workstations" -require "google/cloud/workstations/v1/version" - -module Google - module Cloud - module Workstations - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/workstations/v1" - # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/workstations/v1" - # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/workstations/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb deleted file mode 100644 index 4e045e2c88f2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/bindings_override.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module Workstations - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/workstations/v1/rest" - # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workstations"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, 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/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, 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/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/rest.rb deleted file mode 100644 index 4a1cec95dcc9..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/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/workstations/v1/workstations/rest" -require "google/cloud/workstations/v1/bindings_override" -require "google/cloud/workstations/v1/version" - -module Google - module Cloud - module Workstations - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/workstations/v1/rest" - # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/version.rb deleted file mode 100644 index fda56f15b199..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/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 Workstations - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.rb deleted file mode 100644 index 08a4bda4af66..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations.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/workstations/v1/version" - -require "google/cloud/workstations/v1/workstations/credentials" -require "google/cloud/workstations/v1/workstations/paths" -require "google/cloud/workstations/v1/workstations/operations" -require "google/cloud/workstations/v1/workstations/client" -require "google/cloud/workstations/v1/workstations/rest" - -module Google - module Cloud - module Workstations - module V1 - ## - # Service for interacting with Cloud Workstations. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/workstations/v1/workstations" - # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/workstations/v1/workstations/rest" - # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - module Workstations - end - end - end - end -end - -helper_path = ::File.join __dir__, "workstations", "helpers.rb" -require "google/cloud/workstations/v1/workstations/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb deleted file mode 100644 index 0a8ab36092c6..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/client.rb +++ /dev/null @@ -1,2595 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/workstations/v1/workstations_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Workstations - module V1 - module Workstations - ## - # Client for the Workstations service. - # - # Service for interacting with Cloud Workstations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workstations_stub - - ## - # Configure the Workstations Client class. - # - # See {::Google::Cloud::Workstations::V1::Workstations::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Workstations clients - # ::Google::Cloud::Workstations::V1::Workstations::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workstations", "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_workstation_cluster.timeout = 60.0 - default_config.rpcs.get_workstation_cluster.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstation_clusters.timeout = 60.0 - default_config.rpcs.list_workstation_clusters.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation_cluster.timeout = 60.0 - - default_config.rpcs.update_workstation_cluster.timeout = 60.0 - - default_config.rpcs.delete_workstation_cluster.timeout = 60.0 - - default_config.rpcs.get_workstation_config.timeout = 60.0 - default_config.rpcs.get_workstation_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstation_configs.timeout = 60.0 - default_config.rpcs.list_workstation_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_usable_workstation_configs.timeout = 60.0 - default_config.rpcs.list_usable_workstation_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation_config.timeout = 60.0 - - default_config.rpcs.update_workstation_config.timeout = 60.0 - - default_config.rpcs.delete_workstation_config.timeout = 60.0 - - default_config.rpcs.get_workstation.timeout = 60.0 - default_config.rpcs.get_workstation.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstations.timeout = 60.0 - default_config.rpcs.list_workstations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_usable_workstations.timeout = 60.0 - default_config.rpcs.list_usable_workstations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation.timeout = 60.0 - - default_config.rpcs.update_workstation.timeout = 60.0 - - default_config.rpcs.delete_workstation.timeout = 60.0 - - default_config.rpcs.start_workstation.timeout = 60.0 - - default_config.rpcs.stop_workstation.timeout = 60.0 - - default_config.rpcs.generate_access_token.timeout = 60.0 - default_config.rpcs.generate_access_token.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 Workstations Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workstations::V1::Workstations::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @workstations_stub.universe_domain - end - - ## - # Create a new Workstations client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Workstations 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/workstations/v1/workstations_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 - - @workstations_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Workstations::V1::Workstations::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 - ) - - @workstations_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 = @workstations_stub.endpoint - config.universe_domain = @workstations_stub.universe_domain - config.logger = @workstations_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 = @workstations_stub.endpoint - config.universe_domain = @workstations_stub.universe_domain - config.logger = @workstations_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Workstations::V1::Workstations::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 - @workstations_stub.logger - end - - # Service calls - - ## - # Returns the requested workstation cluster. - # - # @overload get_workstation_cluster(request, options = nil) - # Pass arguments to `get_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workstation_cluster(name: nil) - # Pass arguments to `get_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workstations::V1::WorkstationCluster] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new - # - # # Call the get_workstation_cluster method. - # result = client.get_workstation_cluster request - # - # # The returned object is of type Google::Cloud::Workstations::V1::WorkstationCluster. - # p result - # - def get_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workstation_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :get_workstation_cluster, request, 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 all workstation clusters in the specified location. - # - # @overload list_workstation_clusters(request, options = nil) - # Pass arguments to `list_workstation_clusters` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workstation_clusters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstation_clusters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::WorkstationCluster>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationCluster>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new - # - # # Call the list_workstation_clusters method. - # result = client.list_workstation_clusters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1::WorkstationCluster. - # p item - # end - # - def list_workstation_clusters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workstation_clusters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workstation_clusters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workstation_clusters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_workstation_clusters, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_clusters, request, response, 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 workstation cluster. - # - # @overload create_workstation_cluster(request, options = nil) - # Pass arguments to `create_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) - # Pass arguments to `create_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param workstation_cluster_id [::String] - # Required. ID to use for the workstation cluster. - # @param workstation_cluster [::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash] - # Required. Workstation cluster to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new - # - # # Call the create_workstation_cluster method. - # result = client.create_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_workstation_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :create_workstation_cluster, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 workstation cluster. - # - # @overload update_workstation_cluster(request, options = nil) - # Pass arguments to `update_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workstation_cluster [::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash] - # Required. Workstation cluster to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask that specifies which fields in the workstation cluster - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set, and the workstation cluster is not found, a new - # workstation cluster will be created. In this situation, update_mask is - # ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new - # - # # Call the update_workstation_cluster method. - # result = client.update_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workstation_cluster&.name - header_params["workstation_cluster.name"] = request.workstation_cluster.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_workstation_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :update_workstation_cluster, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified workstation cluster. - # - # @overload delete_workstation_cluster(request, options = nil) - # Pass arguments to `delete_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation cluster to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation cluster on the server does not have this ETag. - # @param force [::Boolean] - # Optional. If set, any workstation configurations and workstations in the - # workstation cluster are also deleted. Otherwise, the request only - # works if the workstation cluster has no configurations or workstations. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new - # - # # Call the delete_workstation_cluster method. - # result = client.delete_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_workstation_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :delete_workstation_cluster, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested workstation configuration. - # - # @overload get_workstation_config(request, options = nil) - # Pass arguments to `get_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workstation_config(name: nil) - # Pass arguments to `get_workstation_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 requested resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workstations::V1::WorkstationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new - # - # # Call the get_workstation_config method. - # result = client.get_workstation_config request - # - # # The returned object is of type Google::Cloud::Workstations::V1::WorkstationConfig. - # p result - # - def get_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workstation_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workstation_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :get_workstation_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 all workstation configurations in the specified cluster. - # - # @overload list_workstation_configs(request, options = nil) - # Pass arguments to `list_workstation_configs` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workstation_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstation_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. Parent resource name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::WorkstationConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new - # - # # Call the list_workstation_configs method. - # result = client.list_workstation_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::Workstations::V1::WorkstationConfig. - # p item - # end - # - def list_workstation_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workstation_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workstation_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workstation_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_workstation_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all workstation configurations in the specified cluster on which - # the caller has the "workstations.workstation.create" permission. - # - # @overload list_usable_workstation_configs(request, options = nil) - # Pass arguments to `list_usable_workstation_configs` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_usable_workstation_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. Parent resource name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::WorkstationConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new - # - # # Call the list_usable_workstation_configs method. - # result = client.list_usable_workstation_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::Workstations::V1::WorkstationConfig. - # p item - # end - # - def list_usable_workstation_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_usable_workstation_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_usable_workstation_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_usable_workstation_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_usable_workstation_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstation_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 a new workstation configuration. - # - # @overload create_workstation_config(request, options = nil) - # Pass arguments to `create_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) - # Pass arguments to `create_workstation_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. Parent resource name. - # @param workstation_config_id [::String] - # Required. ID to use for the workstation configuration. - # @param workstation_config [::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash] - # Required. Config to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new - # - # # Call the create_workstation_config method. - # result = client.create_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workstation_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_workstation_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :create_workstation_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workstation configuration. - # - # @overload update_workstation_config(request, options = nil) - # Pass arguments to `update_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation_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 workstation_config [::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash] - # Required. Config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration will be created. In this situation, - # update_mask is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new - # - # # Call the update_workstation_config method. - # result = client.update_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workstation_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workstation_config&.name - header_params["workstation_config.name"] = request.workstation_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_workstation_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :update_workstation_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified workstation configuration. - # - # @overload delete_workstation_config(request, options = nil) - # Pass arguments to `delete_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_workstation_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 workstation configuration to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request is rejected if the latest version of the - # workstation configuration on the server does not have this ETag. - # @param force [::Boolean] - # Optional. If set, any workstations in the workstation configuration are - # also deleted. Otherwise, the request works only if the workstation - # configuration has no workstations. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new - # - # # Call the delete_workstation_config method. - # result = client.delete_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workstation_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_workstation_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :delete_workstation_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested workstation. - # - # @overload get_workstation(request, options = nil) - # Pass arguments to `get_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::GetWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::GetWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workstation(name: nil) - # Pass arguments to `get_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workstations::V1::Workstation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workstations::V1::Workstation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::GetWorkstationRequest.new - # - # # Call the get_workstation method. - # result = client.get_workstation request - # - # # The returned object is of type Google::Cloud::Workstations::V1::Workstation. - # p result - # - def get_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.get_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :get_workstation, request, 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 all Workstations using the specified workstation configuration. - # - # @overload list_workstations(request, options = nil) - # Pass arguments to `list_workstations` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListWorkstationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListWorkstationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workstations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::Workstation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::Workstation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListWorkstationsRequest.new - # - # # Call the list_workstations method. - # result = client.list_workstations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. - # p item - # end - # - def list_workstations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workstations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_workstations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workstations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_workstations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstations, request, response, 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 all workstations using the specified workstation configuration - # on which the caller has the "workstations.workstations.use" permission. - # - # @overload list_usable_workstations(request, options = nil) - # Pass arguments to `list_usable_workstations` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_usable_workstations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_usable_workstations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::Workstation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1::Workstation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new - # - # # Call the list_usable_workstations method. - # result = client.list_usable_workstations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. - # p item - # end - # - def list_usable_workstations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_usable_workstations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.list_usable_workstations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_usable_workstations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_usable_workstations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstations, request, response, 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 workstation. - # - # @overload create_workstation(request, options = nil) - # Pass arguments to `create_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::CreateWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) - # Pass arguments to `create_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param workstation_id [::String] - # Required. ID to use for the workstation. - # @param workstation [::Google::Cloud::Workstations::V1::Workstation, ::Hash] - # Required. Workstation to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::CreateWorkstationRequest.new - # - # # Call the create_workstation method. - # result = client.create_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.parent - header_params["parent"] = request.parent - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.create_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :create_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 workstation. - # - # @overload update_workstation(request, options = nil) - # Pass arguments to `update_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::UpdateWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workstation [::Google::Cloud::Workstations::V1::Workstation, ::Hash] - # Required. Workstation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration is created. In this situation, update_mask - # is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new - # - # # Call the update_workstation method. - # result = client.update_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workstation&.name - header_params["workstation.name"] = request.workstation.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :update_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified workstation. - # - # @overload delete_workstation(request, options = nil) - # Pass arguments to `delete_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::DeleteWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new - # - # # Call the delete_workstation method. - # result = client.delete_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.delete_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :delete_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 running a workstation so that users can connect to it. - # - # @overload start_workstation(request, options = nil) - # Pass arguments to `start_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::StartWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::StartWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `start_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to start. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::StartWorkstationRequest.new - # - # # Call the start_workstation method. - # result = client.start_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::StartWorkstationRequest - - # Converts hash and nil to 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :start_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stops running a workstation, reducing costs. - # - # @overload stop_workstation(request, options = nil) - # Pass arguments to `stop_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::StopWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::StopWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `stop_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to stop. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::StopWorkstationRequest.new - # - # # Call the stop_workstation method. - # result = client.stop_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::StopWorkstationRequest - - # Converts hash and nil to 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stop_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :stop_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a short-lived credential that can be used to send authenticated and - # authorized traffic to a workstation. - # - # @overload generate_access_token(request, options = nil) - # Pass arguments to `generate_access_token` via a request object, either of type - # {::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_token(expire_time: nil, ttl: nil, workstation: nil) - # Pass arguments to `generate_access_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] - # Desired expiration time of the access token. This value must - # be at most 24 hours in the future. If a value is not specified, the - # token's expiration time will be set to a default value of 1 hour in the - # future. - # - # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. 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 ttl [::Google::Protobuf::Duration, ::Hash] - # Desired lifetime duration of the access token. This value must - # be at most 24 hours. If a value is not specified, the token's lifetime - # will be set to a default value of 1 hour. - # - # Note: The following parameters are mutually exclusive: `ttl`, `expire_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 workstation [::String] - # Required. Name of the workstation for which the access token should be - # generated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new - # - # # Call the generate_access_token method. - # result = client.generate_access_token request - # - # # The returned object is of type Google::Cloud::Workstations::V1::GenerateAccessTokenResponse. - # p result - # - def generate_access_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest - - # Converts hash and nil to 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_access_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.workstation - header_params["workstation"] = request.workstation - end - - request_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_access_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_access_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :generate_access_token, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Workstations API. - # - # This class represents the configuration for Workstations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Workstations::V1::Workstations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_workstation_cluster to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workstations::V1::Workstations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_workstation_cluster.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_workstation_cluster.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Workstations::V1::Workstations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workstations.googleapis.com" - - config_attr :endpoint, nil, ::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 Workstations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation_cluster - ## - # RPC-specific configuration for `list_workstation_clusters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstation_clusters - ## - # RPC-specific configuration for `create_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation_cluster - ## - # RPC-specific configuration for `update_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation_cluster - ## - # RPC-specific configuration for `delete_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation_cluster - ## - # RPC-specific configuration for `get_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation_config - ## - # RPC-specific configuration for `list_workstation_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstation_configs - ## - # RPC-specific configuration for `list_usable_workstation_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_usable_workstation_configs - ## - # RPC-specific configuration for `create_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation_config - ## - # RPC-specific configuration for `update_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation_config - ## - # RPC-specific configuration for `delete_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation_config - ## - # RPC-specific configuration for `get_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation - ## - # RPC-specific configuration for `list_workstations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstations - ## - # RPC-specific configuration for `list_usable_workstations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_usable_workstations - ## - # RPC-specific configuration for `create_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation - ## - # RPC-specific configuration for `update_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation - ## - # RPC-specific configuration for `delete_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation - ## - # RPC-specific configuration for `start_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :start_workstation - ## - # RPC-specific configuration for `stop_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_workstation - ## - # RPC-specific configuration for `generate_access_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_access_token - - # @private - def initialize parent_rpcs = nil - get_workstation_cluster_config = parent_rpcs.get_workstation_cluster if parent_rpcs.respond_to? :get_workstation_cluster - @get_workstation_cluster = ::Gapic::Config::Method.new get_workstation_cluster_config - list_workstation_clusters_config = parent_rpcs.list_workstation_clusters if parent_rpcs.respond_to? :list_workstation_clusters - @list_workstation_clusters = ::Gapic::Config::Method.new list_workstation_clusters_config - create_workstation_cluster_config = parent_rpcs.create_workstation_cluster if parent_rpcs.respond_to? :create_workstation_cluster - @create_workstation_cluster = ::Gapic::Config::Method.new create_workstation_cluster_config - update_workstation_cluster_config = parent_rpcs.update_workstation_cluster if parent_rpcs.respond_to? :update_workstation_cluster - @update_workstation_cluster = ::Gapic::Config::Method.new update_workstation_cluster_config - delete_workstation_cluster_config = parent_rpcs.delete_workstation_cluster if parent_rpcs.respond_to? :delete_workstation_cluster - @delete_workstation_cluster = ::Gapic::Config::Method.new delete_workstation_cluster_config - get_workstation_config_config = parent_rpcs.get_workstation_config if parent_rpcs.respond_to? :get_workstation_config - @get_workstation_config = ::Gapic::Config::Method.new get_workstation_config_config - list_workstation_configs_config = parent_rpcs.list_workstation_configs if parent_rpcs.respond_to? :list_workstation_configs - @list_workstation_configs = ::Gapic::Config::Method.new list_workstation_configs_config - list_usable_workstation_configs_config = parent_rpcs.list_usable_workstation_configs if parent_rpcs.respond_to? :list_usable_workstation_configs - @list_usable_workstation_configs = ::Gapic::Config::Method.new list_usable_workstation_configs_config - create_workstation_config_config = parent_rpcs.create_workstation_config if parent_rpcs.respond_to? :create_workstation_config - @create_workstation_config = ::Gapic::Config::Method.new create_workstation_config_config - update_workstation_config_config = parent_rpcs.update_workstation_config if parent_rpcs.respond_to? :update_workstation_config - @update_workstation_config = ::Gapic::Config::Method.new update_workstation_config_config - delete_workstation_config_config = parent_rpcs.delete_workstation_config if parent_rpcs.respond_to? :delete_workstation_config - @delete_workstation_config = ::Gapic::Config::Method.new delete_workstation_config_config - get_workstation_config = parent_rpcs.get_workstation if parent_rpcs.respond_to? :get_workstation - @get_workstation = ::Gapic::Config::Method.new get_workstation_config - list_workstations_config = parent_rpcs.list_workstations if parent_rpcs.respond_to? :list_workstations - @list_workstations = ::Gapic::Config::Method.new list_workstations_config - list_usable_workstations_config = parent_rpcs.list_usable_workstations if parent_rpcs.respond_to? :list_usable_workstations - @list_usable_workstations = ::Gapic::Config::Method.new list_usable_workstations_config - create_workstation_config = parent_rpcs.create_workstation if parent_rpcs.respond_to? :create_workstation - @create_workstation = ::Gapic::Config::Method.new create_workstation_config - update_workstation_config = parent_rpcs.update_workstation if parent_rpcs.respond_to? :update_workstation - @update_workstation = ::Gapic::Config::Method.new update_workstation_config - delete_workstation_config = parent_rpcs.delete_workstation if parent_rpcs.respond_to? :delete_workstation - @delete_workstation = ::Gapic::Config::Method.new delete_workstation_config - start_workstation_config = parent_rpcs.start_workstation if parent_rpcs.respond_to? :start_workstation - @start_workstation = ::Gapic::Config::Method.new start_workstation_config - stop_workstation_config = parent_rpcs.stop_workstation if parent_rpcs.respond_to? :stop_workstation - @stop_workstation = ::Gapic::Config::Method.new stop_workstation_config - generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token - @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/credentials.rb deleted file mode 100644 index dfd9bd39ea0a..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/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 Workstations - module V1 - module Workstations - # Credentials for the Workstations 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-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb deleted file mode 100644 index 667b9e605bce..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Workstations - module V1 - module Workstations - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Workstations 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 Workstations 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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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::Workstations::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workstations.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/paths.rb deleted file mode 100644 index 464e72c7f12e..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/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 Workstations - module V1 - module Workstations - # Path helper methods for the Workstations 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 Workstation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}` - # - # @param project [String] - # @param location [String] - # @param workstation_cluster [String] - # @param workstation_config [String] - # @param workstation [String] - # - # @return [::String] - def workstation_path project:, location:, workstation_cluster:, workstation_config:, workstation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "workstation_cluster cannot contain /" if workstation_cluster.to_s.include? "/" - raise ::ArgumentError, "workstation_config cannot contain /" if workstation_config.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}/workstations/#{workstation}" - end - - ## - # Create a fully-qualified WorkstationCluster resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}` - # - # @param project [String] - # @param location [String] - # @param workstation_cluster [String] - # - # @return [::String] - def workstation_cluster_path project:, location:, workstation_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}/workstationClusters/#{workstation_cluster}" - end - - ## - # Create a fully-qualified WorkstationConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}` - # - # @param project [String] - # @param location [String] - # @param workstation_cluster [String] - # @param workstation_config [String] - # - # @return [::String] - def workstation_config_path project:, location:, workstation_cluster:, workstation_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "workstation_cluster cannot contain /" if workstation_cluster.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest.rb deleted file mode 100644 index ba4f83cc6e0c..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/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/workstations/v1/version" -require "google/cloud/workstations/v1/bindings_override" - -require "google/cloud/workstations/v1/workstations/credentials" -require "google/cloud/workstations/v1/workstations/paths" -require "google/cloud/workstations/v1/workstations/rest/operations" -require "google/cloud/workstations/v1/workstations/rest/client" - -module Google - module Cloud - module Workstations - module V1 - ## - # Service for interacting with Cloud Workstations. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/workstations/v1/workstations/rest" - # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - module Workstations - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/workstations/v1/workstations/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb deleted file mode 100644 index fe30c7b2e4fe..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/client.rb +++ /dev/null @@ -1,2420 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/workstations/v1/workstations_pb" -require "google/cloud/workstations/v1/workstations/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Workstations - module V1 - module Workstations - module Rest - ## - # REST client for the Workstations service. - # - # Service for interacting with Cloud Workstations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workstations_stub - - ## - # Configure the Workstations Client class. - # - # See {::Google::Cloud::Workstations::V1::Workstations::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Workstations clients - # ::Google::Cloud::Workstations::V1::Workstations::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", "Workstations", "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_workstation_cluster.timeout = 60.0 - default_config.rpcs.get_workstation_cluster.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstation_clusters.timeout = 60.0 - default_config.rpcs.list_workstation_clusters.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation_cluster.timeout = 60.0 - - default_config.rpcs.update_workstation_cluster.timeout = 60.0 - - default_config.rpcs.delete_workstation_cluster.timeout = 60.0 - - default_config.rpcs.get_workstation_config.timeout = 60.0 - default_config.rpcs.get_workstation_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstation_configs.timeout = 60.0 - default_config.rpcs.list_workstation_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_usable_workstation_configs.timeout = 60.0 - default_config.rpcs.list_usable_workstation_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation_config.timeout = 60.0 - - default_config.rpcs.update_workstation_config.timeout = 60.0 - - default_config.rpcs.delete_workstation_config.timeout = 60.0 - - default_config.rpcs.get_workstation.timeout = 60.0 - default_config.rpcs.get_workstation.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstations.timeout = 60.0 - default_config.rpcs.list_workstations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_usable_workstations.timeout = 60.0 - default_config.rpcs.list_usable_workstations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation.timeout = 60.0 - - default_config.rpcs.update_workstation.timeout = 60.0 - - default_config.rpcs.delete_workstation.timeout = 60.0 - - default_config.rpcs.start_workstation.timeout = 60.0 - - default_config.rpcs.stop_workstation.timeout = 60.0 - - default_config.rpcs.generate_access_token.timeout = 60.0 - default_config.rpcs.generate_access_token.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 Workstations Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workstations::V1::Workstations::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 - @workstations_stub.universe_domain - end - - ## - # Create a new Workstations REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Workstations 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::Workstations::V1::Workstations::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 - - @workstations_stub = ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @workstations_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 = @workstations_stub.endpoint - config.universe_domain = @workstations_stub.universe_domain - config.logger = @workstations_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 = @workstations_stub.endpoint - config.universe_domain = @workstations_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @workstations_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Workstations::V1::Workstations::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 - @workstations_stub.logger - end - - # Service calls - - ## - # Returns the requested workstation cluster. - # - # @overload get_workstation_cluster(request, options = nil) - # Pass arguments to `get_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workstation_cluster(name: nil) - # Pass arguments to `get_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::WorkstationCluster] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new - # - # # Call the get_workstation_cluster method. - # result = client.get_workstation_cluster request - # - # # The returned object is of type Google::Cloud::Workstations::V1::WorkstationCluster. - # p result - # - def get_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workstation_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.get_workstation_cluster request, 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 all workstation clusters in the specified location. - # - # @overload list_workstation_clusters(request, options = nil) - # Pass arguments to `list_workstation_clusters` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workstation_clusters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstation_clusters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::WorkstationCluster>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationCluster>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new - # - # # Call the list_workstation_clusters method. - # result = client.list_workstation_clusters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1::WorkstationCluster. - # p item - # end - # - def list_workstation_clusters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workstation_clusters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workstation_clusters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workstation_clusters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_workstation_clusters request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstation_clusters, "workstation_clusters", request, result, 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 workstation cluster. - # - # @overload create_workstation_cluster(request, options = nil) - # Pass arguments to `create_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) - # Pass arguments to `create_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param workstation_cluster_id [::String] - # Required. ID to use for the workstation cluster. - # @param workstation_cluster [::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash] - # Required. Workstation cluster to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new - # - # # Call the create_workstation_cluster method. - # result = client.create_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest - - # Converts hash and nil to an 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_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workstation_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.create_workstation_cluster request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation cluster. - # - # @overload update_workstation_cluster(request, options = nil) - # Pass arguments to `update_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workstation_cluster [::Google::Cloud::Workstations::V1::WorkstationCluster, ::Hash] - # Required. Workstation cluster to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask that specifies which fields in the workstation cluster - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set, and the workstation cluster is not found, a new - # workstation cluster will be created. In this situation, update_mask is - # ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new - # - # # Call the update_workstation_cluster method. - # result = client.update_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workstation_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.update_workstation_cluster request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation cluster. - # - # @overload delete_workstation_cluster(request, options = nil) - # Pass arguments to `delete_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation cluster to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation cluster on the server does not have this ETag. - # @param force [::Boolean] - # Optional. If set, any workstation configurations and workstations in the - # workstation cluster are also deleted. Otherwise, the request only - # works if the workstation cluster has no configurations or workstations. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new - # - # # Call the delete_workstation_cluster method. - # result = client.delete_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_workstation_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.delete_workstation_cluster request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested workstation configuration. - # - # @overload get_workstation_config(request, options = nil) - # Pass arguments to `get_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workstation_config(name: nil) - # Pass arguments to `get_workstation_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 requested resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::WorkstationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new - # - # # Call the get_workstation_config method. - # result = client.get_workstation_config request - # - # # The returned object is of type Google::Cloud::Workstations::V1::WorkstationConfig. - # p result - # - def get_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workstation_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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workstation_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.get_workstation_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 all workstation configurations in the specified cluster. - # - # @overload list_workstation_configs(request, options = nil) - # Pass arguments to `list_workstation_configs` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workstation_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstation_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. Parent resource name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::WorkstationConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new - # - # # Call the list_workstation_configs method. - # result = client.list_workstation_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::Workstations::V1::WorkstationConfig. - # p item - # end - # - def list_workstation_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workstation_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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workstation_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workstation_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_workstation_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstation_configs, "workstation_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all workstation configurations in the specified cluster on which - # the caller has the "workstations.workstation.create" permission. - # - # @overload list_usable_workstation_configs(request, options = nil) - # Pass arguments to `list_usable_workstation_configs` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_usable_workstation_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. Parent resource name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::WorkstationConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::WorkstationConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new - # - # # Call the list_usable_workstation_configs method. - # result = client.list_usable_workstation_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::Workstations::V1::WorkstationConfig. - # p item - # end - # - def list_usable_workstation_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_usable_workstation_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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_usable_workstation_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_usable_workstation_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_usable_workstation_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_usable_workstation_configs, "workstation_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 a new workstation configuration. - # - # @overload create_workstation_config(request, options = nil) - # Pass arguments to `create_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) - # Pass arguments to `create_workstation_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. Parent resource name. - # @param workstation_config_id [::String] - # Required. ID to use for the workstation configuration. - # @param workstation_config [::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash] - # Required. Config to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new - # - # # Call the create_workstation_config method. - # result = client.create_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest - - # Converts hash and nil to an 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_workstation_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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workstation_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.create_workstation_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workstation configuration. - # - # @overload update_workstation_config(request, options = nil) - # Pass arguments to `update_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation_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 workstation_config [::Google::Cloud::Workstations::V1::WorkstationConfig, ::Hash] - # Required. Config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration will be created. In this situation, - # update_mask is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new - # - # # Call the update_workstation_config method. - # result = client.update_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_workstation_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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workstation_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.update_workstation_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified workstation configuration. - # - # @overload delete_workstation_config(request, options = nil) - # Pass arguments to `delete_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_workstation_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 workstation configuration to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request is rejected if the latest version of the - # workstation configuration on the server does not have this ETag. - # @param force [::Boolean] - # Optional. If set, any workstations in the workstation configuration are - # also deleted. Otherwise, the request works only if the workstation - # configuration has no workstations. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new - # - # # Call the delete_workstation_config method. - # result = client.delete_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_workstation_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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_workstation_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.delete_workstation_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested workstation. - # - # @overload get_workstation(request, options = nil) - # Pass arguments to `get_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::GetWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::GetWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workstation(name: nil) - # Pass arguments to `get_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::Workstation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::Workstation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::GetWorkstationRequest.new - # - # # Call the get_workstation method. - # result = client.get_workstation request - # - # # The returned object is of type Google::Cloud::Workstations::V1::Workstation. - # p result - # - def get_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GetWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.get_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.get_workstation request, 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 all Workstations using the specified workstation configuration. - # - # @overload list_workstations(request, options = nil) - # Pass arguments to `list_workstations` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListWorkstationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListWorkstationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workstations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::Workstation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::Workstation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListWorkstationsRequest.new - # - # # Call the list_workstations method. - # result = client.list_workstations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. - # p item - # end - # - def list_workstations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListWorkstationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workstations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_workstations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workstations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_workstations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstations, "workstations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all workstations using the specified workstation configuration - # on which the caller has the "workstations.workstations.use" permission. - # - # @overload list_usable_workstations(request, options = nil) - # Pass arguments to `list_usable_workstations` via a request object, either of type - # {::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_usable_workstations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_usable_workstations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1::Workstation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1::Workstation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new - # - # # Call the list_usable_workstations method. - # result = client.list_usable_workstations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. - # p item - # end - # - def list_usable_workstations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_usable_workstations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.list_usable_workstations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_usable_workstations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_usable_workstations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_usable_workstations, "workstations", request, result, 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 workstation. - # - # @overload create_workstation(request, options = nil) - # Pass arguments to `create_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::CreateWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::CreateWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) - # Pass arguments to `create_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param workstation_id [::String] - # Required. ID to use for the workstation. - # @param workstation [::Google::Cloud::Workstations::V1::Workstation, ::Hash] - # Required. Workstation to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::CreateWorkstationRequest.new - # - # # Call the create_workstation method. - # result = client.create_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::CreateWorkstationRequest - - # Converts hash and nil to an 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.create_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation. - # - # @overload update_workstation(request, options = nil) - # Pass arguments to `update_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::UpdateWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::UpdateWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workstation [::Google::Cloud::Workstations::V1::Workstation, ::Hash] - # Required. Workstation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration is created. In this situation, update_mask - # is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new - # - # # Call the update_workstation method. - # result = client.update_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.update_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation. - # - # @overload delete_workstation(request, options = nil) - # Pass arguments to `delete_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::DeleteWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::DeleteWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new - # - # # Call the delete_workstation method. - # result = client.delete_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.delete_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.delete_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 running a workstation so that users can connect to it. - # - # @overload start_workstation(request, options = nil) - # Pass arguments to `start_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::StartWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::StartWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `start_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to start. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::StartWorkstationRequest.new - # - # # Call the start_workstation method. - # result = client.start_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::StartWorkstationRequest - - # Converts hash and nil to an 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.start_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stops running a workstation, reducing costs. - # - # @overload stop_workstation(request, options = nil) - # Pass arguments to `stop_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1::StopWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::StopWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `stop_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to stop. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::StopWorkstationRequest.new - # - # # Call the stop_workstation method. - # result = client.stop_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::StopWorkstationRequest - - # Converts hash and nil to an 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.stop_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.stop_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a short-lived credential that can be used to send authenticated and - # authorized traffic to a workstation. - # - # @overload generate_access_token(request, options = nil) - # Pass arguments to `generate_access_token` via a request object, either of type - # {::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_token(expire_time: nil, ttl: nil, workstation: nil) - # Pass arguments to `generate_access_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] - # Desired expiration time of the access token. This value must - # be at most 24 hours in the future. If a value is not specified, the - # token's expiration time will be set to a default value of 1 hour in the - # future. - # - # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. 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 ttl [::Google::Protobuf::Duration, ::Hash] - # Desired lifetime duration of the access token. This value must - # be at most 24 hours. If a value is not specified, the token's lifetime - # will be set to a default value of 1 hour. - # - # Note: The following parameters are mutually exclusive: `ttl`, `expire_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 workstation [::String] - # Required. Name of the workstation for which the access token should be - # generated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new - # - # # Call the generate_access_token method. - # result = client.generate_access_token request - # - # # The returned object is of type Google::Cloud::Workstations::V1::GenerateAccessTokenResponse. - # p result - # - def generate_access_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest - - # Converts hash and nil to an 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_access_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_token.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_access_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.generate_access_token request, 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 Workstations REST API. - # - # This class represents the configuration for Workstations 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::Workstations::V1::Workstations::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_workstation_cluster to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_workstation_cluster.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_workstation_cluster.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workstations.googleapis.com" - - config_attr :endpoint, nil, ::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 Workstations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation_cluster - ## - # RPC-specific configuration for `list_workstation_clusters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstation_clusters - ## - # RPC-specific configuration for `create_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation_cluster - ## - # RPC-specific configuration for `update_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation_cluster - ## - # RPC-specific configuration for `delete_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation_cluster - ## - # RPC-specific configuration for `get_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation_config - ## - # RPC-specific configuration for `list_workstation_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstation_configs - ## - # RPC-specific configuration for `list_usable_workstation_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_usable_workstation_configs - ## - # RPC-specific configuration for `create_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation_config - ## - # RPC-specific configuration for `update_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation_config - ## - # RPC-specific configuration for `delete_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation_config - ## - # RPC-specific configuration for `get_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation - ## - # RPC-specific configuration for `list_workstations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstations - ## - # RPC-specific configuration for `list_usable_workstations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_usable_workstations - ## - # RPC-specific configuration for `create_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation - ## - # RPC-specific configuration for `update_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation - ## - # RPC-specific configuration for `delete_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation - ## - # RPC-specific configuration for `start_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :start_workstation - ## - # RPC-specific configuration for `stop_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_workstation - ## - # RPC-specific configuration for `generate_access_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_access_token - - # @private - def initialize parent_rpcs = nil - get_workstation_cluster_config = parent_rpcs.get_workstation_cluster if parent_rpcs.respond_to? :get_workstation_cluster - @get_workstation_cluster = ::Gapic::Config::Method.new get_workstation_cluster_config - list_workstation_clusters_config = parent_rpcs.list_workstation_clusters if parent_rpcs.respond_to? :list_workstation_clusters - @list_workstation_clusters = ::Gapic::Config::Method.new list_workstation_clusters_config - create_workstation_cluster_config = parent_rpcs.create_workstation_cluster if parent_rpcs.respond_to? :create_workstation_cluster - @create_workstation_cluster = ::Gapic::Config::Method.new create_workstation_cluster_config - update_workstation_cluster_config = parent_rpcs.update_workstation_cluster if parent_rpcs.respond_to? :update_workstation_cluster - @update_workstation_cluster = ::Gapic::Config::Method.new update_workstation_cluster_config - delete_workstation_cluster_config = parent_rpcs.delete_workstation_cluster if parent_rpcs.respond_to? :delete_workstation_cluster - @delete_workstation_cluster = ::Gapic::Config::Method.new delete_workstation_cluster_config - get_workstation_config_config = parent_rpcs.get_workstation_config if parent_rpcs.respond_to? :get_workstation_config - @get_workstation_config = ::Gapic::Config::Method.new get_workstation_config_config - list_workstation_configs_config = parent_rpcs.list_workstation_configs if parent_rpcs.respond_to? :list_workstation_configs - @list_workstation_configs = ::Gapic::Config::Method.new list_workstation_configs_config - list_usable_workstation_configs_config = parent_rpcs.list_usable_workstation_configs if parent_rpcs.respond_to? :list_usable_workstation_configs - @list_usable_workstation_configs = ::Gapic::Config::Method.new list_usable_workstation_configs_config - create_workstation_config_config = parent_rpcs.create_workstation_config if parent_rpcs.respond_to? :create_workstation_config - @create_workstation_config = ::Gapic::Config::Method.new create_workstation_config_config - update_workstation_config_config = parent_rpcs.update_workstation_config if parent_rpcs.respond_to? :update_workstation_config - @update_workstation_config = ::Gapic::Config::Method.new update_workstation_config_config - delete_workstation_config_config = parent_rpcs.delete_workstation_config if parent_rpcs.respond_to? :delete_workstation_config - @delete_workstation_config = ::Gapic::Config::Method.new delete_workstation_config_config - get_workstation_config = parent_rpcs.get_workstation if parent_rpcs.respond_to? :get_workstation - @get_workstation = ::Gapic::Config::Method.new get_workstation_config - list_workstations_config = parent_rpcs.list_workstations if parent_rpcs.respond_to? :list_workstations - @list_workstations = ::Gapic::Config::Method.new list_workstations_config - list_usable_workstations_config = parent_rpcs.list_usable_workstations if parent_rpcs.respond_to? :list_usable_workstations - @list_usable_workstations = ::Gapic::Config::Method.new list_usable_workstations_config - create_workstation_config = parent_rpcs.create_workstation if parent_rpcs.respond_to? :create_workstation - @create_workstation = ::Gapic::Config::Method.new create_workstation_config - update_workstation_config = parent_rpcs.update_workstation if parent_rpcs.respond_to? :update_workstation - @update_workstation = ::Gapic::Config::Method.new update_workstation_config - delete_workstation_config = parent_rpcs.delete_workstation if parent_rpcs.respond_to? :delete_workstation - @delete_workstation = ::Gapic::Config::Method.new delete_workstation_config - start_workstation_config = parent_rpcs.start_workstation if parent_rpcs.respond_to? :start_workstation - @start_workstation = ::Gapic::Config::Method.new start_workstation_config - stop_workstation_config = parent_rpcs.stop_workstation if parent_rpcs.respond_to? :stop_workstation - @stop_workstation = ::Gapic::Config::Method.new stop_workstation_config - generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token - @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb deleted file mode 100644 index 5408543aa712..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Workstations - module V1 - module Workstations - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Workstations 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 Workstations 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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION 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::Workstations::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workstations.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb deleted file mode 100644 index 420e199f7069..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations/rest/service_stub.rb +++ /dev/null @@ -1,1310 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workstations/v1/workstations_pb" - -module Google - module Cloud - module Workstations - module V1 - module Workstations - module Rest - ## - # REST service stub for the Workstations 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_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::WorkstationCluster] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] - # A result object deserialized from the server's reply - def get_workstation_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_workstation_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1::WorkstationCluster.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workstation_clusters REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse] - # A result object deserialized from the server's reply - def list_workstation_clusters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workstation_clusters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_workstation_clusters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse.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_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_workstation_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_workstation_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workstation_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::WorkstationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] - # A result object deserialized from the server's reply - def get_workstation_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_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_workstation_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1::WorkstationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workstation_configs REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse] - # A result object deserialized from the server's reply - def list_workstation_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workstation_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_workstation_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_usable_workstation_configs REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse] - # A result object deserialized from the server's reply - def list_usable_workstation_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_usable_workstation_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_usable_workstation_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse.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_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_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_workstation_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_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_workstation_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_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_workstation_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::Workstation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::Workstation] - # A result object deserialized from the server's reply - def get_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1::Workstation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workstations REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::ListWorkstationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::ListWorkstationsResponse] - # A result object deserialized from the server's reply - def list_workstations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workstations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_workstations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1::ListWorkstationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_usable_workstations REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse] - # A result object deserialized from the server's reply - def list_usable_workstations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_usable_workstations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_usable_workstations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse.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_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::StartWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::StopWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_stop_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_access_token REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse] - # A result object deserialized from the server's reply - def generate_access_token request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_access_token_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_token", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse.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_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workstation_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workstation_clusters REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workstation_clusters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workstationClusters", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest] - # 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_workstation_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/workstationClusters", - body: "workstation_cluster", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workstation_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{workstation_cluster.name}", - body: "workstation_cluster", - matches: [ - ["workstation_cluster.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workstation_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workstation_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workstation_configs REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workstation_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workstationConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_usable_workstation_configs REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_usable_workstation_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workstationConfigs:listUsable", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest] - # 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_workstation_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/workstationConfigs", - body: "workstation_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workstation_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{workstation_config.name}", - body: "workstation_config", - matches: [ - ["workstation_config.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workstation_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::GetWorkstationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workstations REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListWorkstationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workstations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workstations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_usable_workstations REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_usable_workstations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/workstations:listUsable", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::CreateWorkstationRequest] - # 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_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/workstations", - body: "workstation", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::UpdateWorkstationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{workstation.name}", - body: "workstation", - matches: [ - ["workstation.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::DeleteWorkstationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::StartWorkstationRequest] - # 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_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the stop_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::StopWorkstationRequest] - # 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_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:stop", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_access_token REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest] - # 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_access_token_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{workstation}:generateAccessToken", - body: "*", - matches: [ - ["workstation", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb deleted file mode 100644 index d6d6c7cebef9..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_pb.rb +++ /dev/null @@ -1,97 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/workstations/v1/workstations.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/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n/google/cloud/workstations/v1/workstations.proto\x12\x1cgoogle.cloud.workstations.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 google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x87\t\n\x12WorkstationCluster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12[\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x41.google.cloud.workstations.v1.WorkstationCluster.AnnotationsEntryB\x03\xe0\x41\x01\x12Q\n\x06labels\x18\x0f \x03(\x0b\x32<.google.cloud.workstations.v1.WorkstationCluster.LabelsEntryB\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\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07network\x18\n \x01(\tB\x03\xe0\x41\x05\x12\x17\n\nsubnetwork\x18\x0b \x01(\tB\x03\xe0\x41\x05\x12\x1d\n\x10\x63ontrol_plane_ip\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12j\n\x16private_cluster_config\x18\x0c \x01(\x0b\x32\x45.google.cloud.workstations.v1.WorkstationCluster.PrivateClusterConfigB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65graded\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x0e \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\x9f\x01\n\x14PrivateClusterConfig\x12$\n\x17\x65nable_private_endpoint\x18\x01 \x01(\x08\x42\x03\xe0\x41\x05\x12\x1d\n\x10\x63luster_hostname\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16service_attachment_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x61llowed_projects\x18\x04 \x03(\tB\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb3\x01\xea\x41\xaf\x01\n.workstations.googleapis.com/WorkstationCluster\x12Qprojects/{project}/locations/{location}/workstationClusters/{workstation_cluster}*\x13workstationClusters2\x12workstationClusterR\x01\x01\"\xb2\x19\n\x11WorkstationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12Z\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32@.google.cloud.workstations.v1.WorkstationConfig.AnnotationsEntryB\x03\xe0\x41\x01\x12P\n\x06labels\x18\x12 \x03(\x0b\x32;.google.cloud.workstations.v1.WorkstationConfig.LabelsEntryB\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\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0frunning_timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12G\n\x04host\x18\x0c \x01(\x0b\x32\x34.google.cloud.workstations.v1.WorkstationConfig.HostB\x03\xe0\x41\x01\x12h\n\x16persistent_directories\x18\r \x03(\x0b\x32\x43.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectoryB\x03\xe0\x41\x01\x12Q\n\tcontainer\x18\x0e \x01(\x0b\x32\x39.google.cloud.workstations.v1.WorkstationConfig.ContainerB\x03\xe0\x41\x01\x12\x62\n\x0e\x65ncryption_key\x18\x11 \x01(\x0b\x32\x45.google.cloud.workstations.v1.WorkstationConfig.CustomerEncryptionKeyB\x03\xe0\x41\x05\x12]\n\x10readiness_checks\x18\x13 \x03(\x0b\x32>.google.cloud.workstations.v1.WorkstationConfig.ReadinessCheckB\x03\xe0\x41\x01\x12\x1d\n\rreplica_zones\x18\x17 \x03(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12\x15\n\x08\x64\x65graded\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x10 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\xf5\x06\n\x04Host\x12X\n\x0cgce_instance\x18\x01 \x01(\x0b\x32@.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstanceH\x00\x1a\x88\x06\n\x0bGceInstance\x12\x19\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16service_account_scopes\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10pooled_instances\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12(\n\x1b\x64isable_public_ip_addresses\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x81\x01\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32Z.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceShieldedInstanceConfigB\x03\xe0\x41\x01\x12\x89\x01\n\x1c\x63onfidential_instance_config\x18\n \x01(\x0b\x32^.google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfigB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\t \x01(\x05\x42\x03\xe0\x41\x01\x1a\x80\x01\n\x19GceShieldedInstanceConfig\x12\x1f\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x65nable_vtpm\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1b\x65nable_integrity_monitoring\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x1dGceConfidentialInstanceConfig\x12(\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x42\x08\n\x06\x63onfig\x1a\x85\x04\n\x13PersistentDirectory\x12o\n\x06gce_pd\x18\x02 \x01(\x0b\x32].google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xd1\x02\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07\x66s_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x88\x01\n\x0ereclaim_policy\x18\x04 \x01(\x0e\x32k.google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicyB\x03\xe0\x41\x01\"G\n\rReclaimPolicy\x12\x1e\n\x1aRECLAIM_POLICY_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\n\n\x06RETAIN\x10\x02\x42\x10\n\x0e\x64irectory_type\x1a\xfe\x01\n\tContainer\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63ommand\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61rgs\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12T\n\x03\x65nv\x18\x04 \x03(\x0b\x32\x42.google.cloud.workstations.v1.WorkstationConfig.Container.EnvEntryB\x03\xe0\x41\x01\x12\x18\n\x0bworking_dir\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0brun_as_user\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aS\n\x15\x43ustomerEncryptionKey\x12\x14\n\x07kms_key\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12$\n\x17kms_key_service_account\x18\x02 \x01(\tB\x03\xe0\x41\x05\x1a\x36\n\x0eReadinessCheck\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xd8\x01\xea\x41\xd4\x01\n-workstations.googleapis.com/WorkstationConfig\x12yprojects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}*\x12workstationConfigs2\x11workstationConfigR\x01\x01\"\xfc\x07\n\x0bWorkstation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12T\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32:.google.cloud.workstations.v1.Workstation.AnnotationsEntryB\x03\xe0\x41\x01\x12J\n\x06labels\x18\r \x03(\x0b\x32\x35.google.cloud.workstations.v1.Workstation.LabelsEntryB\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\x33\n\nstart_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x05state\x18\n \x01(\x0e\x32/.google.cloud.workstations.v1.Workstation.StateB\x03\xe0\x41\x03\x12\x11\n\x04host\x18\x0b \x01(\tB\x03\xe0\x41\x03\x1a\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATE_STARTING\x10\x01\x12\x11\n\rSTATE_RUNNING\x10\x02\x12\x12\n\x0eSTATE_STOPPING\x10\x03\x12\x11\n\rSTATE_STOPPED\x10\x04:\xe2\x01\xea\x41\xde\x01\n\'workstations.googleapis.com/Workstation\x12\x94\x01projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}*\x0cworkstations2\x0bworkstationR\x01\x01\"d\n\x1cGetWorkstationClusterRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\"\x99\x01\n\x1eListWorkstationClustersRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.workstations.googleapis.com/WorkstationCluster\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\"\x9f\x01\n\x1fListWorkstationClustersResponse\x12N\n\x14workstation_clusters\x18\x01 \x03(\x0b\x32\x30.google.cloud.workstations.v1.WorkstationCluster\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xfe\x01\n\x1f\x43reateWorkstationClusterRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.workstations.googleapis.com/WorkstationCluster\x12#\n\x16workstation_cluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12R\n\x13workstation_cluster\x18\x03 \x01(\x0b\x32\x30.google.cloud.workstations.v1.WorkstationClusterB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe3\x01\n\x1fUpdateWorkstationClusterRequest\x12R\n\x13workstation_cluster\x18\x01 \x01(\x0b\x32\x30.google.cloud.workstations.v1.WorkstationClusterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x01\n\x1f\x44\x65leteWorkstationClusterRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"b\n\x1bGetWorkstationConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\"\x98\x01\n\x1dListWorkstationConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\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\x1eListWorkstationConfigsResponse\x12L\n\x13workstation_configs\x18\x01 \x03(\x0b\x32/.google.cloud.workstations.v1.WorkstationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x9e\x01\n#ListUsableWorkstationConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\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\"\xa2\x01\n$ListUsableWorkstationConfigsResponse\x12L\n\x13workstation_configs\x18\x01 \x03(\x0b\x32/.google.cloud.workstations.v1.WorkstationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xfa\x01\n\x1e\x43reateWorkstationConfigRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\x12\"\n\x15workstation_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12P\n\x12workstation_config\x18\x03 \x01(\x0b\x32/.google.cloud.workstations.v1.WorkstationConfigB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe0\x01\n\x1eUpdateWorkstationConfigRequest\x12P\n\x12workstation_config\x18\x01 \x01(\x0b\x32/.google.cloud.workstations.v1.WorkstationConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x1e\x44\x65leteWorkstationConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x15GetWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\"\x91\x01\n\x17ListWorkstationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\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\"\x93\x01\n\x18ListWorkstationsResponse\x12?\n\x0cworkstations\x18\x01 \x03(\x0b\x32).google.cloud.workstations.v1.Workstation\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x97\x01\n\x1dListUsableWorkstationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\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\"\x8f\x01\n\x1eListUsableWorkstationsResponse\x12?\n\x0cworkstations\x18\x01 \x03(\x0b\x32).google.cloud.workstations.v1.Workstation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xdf\x01\n\x18\x43reateWorkstationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\x12\x1b\n\x0eworkstation_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\x0bworkstation\x18\x03 \x01(\x0b\x32).google.cloud.workstations.v1.WorkstationB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xcd\x01\n\x18UpdateWorkstationRequest\x12\x43\n\x0bworkstation\x18\x01 \x01(\x0b\x32).google.cloud.workstations.v1.WorkstationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x01\n\x18\x44\x65leteWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x17StartWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x16StopWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xcd\x01\n\x1aGenerateAccessTokenRequest\x12\x31\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12(\n\x03ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x44\n\x0bworkstation\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/WorkstationB\x0c\n\nexpiration\"d\n\x1bGenerateAccessTokenResponse\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\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\x9b*\n\x0cWorkstations\x12\xcd\x01\n\x15GetWorkstationCluster\x12:.google.cloud.workstations.v1.GetWorkstationClusterRequest\x1a\x30.google.cloud.workstations.v1.WorkstationCluster\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/workstationClusters/*}\x12\xe0\x01\n\x17ListWorkstationClusters\x12<.google.cloud.workstations.v1.ListWorkstationClustersRequest\x1a=.google.cloud.workstations.v1.ListWorkstationClustersResponse\"H\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{parent=projects/*/locations/*}/workstationClusters\x12\xad\x02\n\x18\x43reateWorkstationCluster\x12=.google.cloud.workstations.v1.CreateWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb2\x01\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x31parent,workstation_cluster,workstation_cluster_id\x82\xd3\xe4\x93\x02N\"7/v1/{parent=projects/*/locations/*}/workstationClusters:\x13workstation_cluster\x12\xaf\x02\n\x18UpdateWorkstationCluster\x12=.google.cloud.workstations.v1.UpdateWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x1fworkstation_cluster,update_mask\x82\xd3\xe4\x93\x02\x62\x32K/v1/{workstation_cluster.name=projects/*/locations/*/workstationClusters/*}:\x13workstation_cluster\x12\xea\x01\n\x18\x44\x65leteWorkstationCluster\x12=.google.cloud.workstations.v1.DeleteWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39*7/v1/{name=projects/*/locations/*/workstationClusters/*}\x12\xdf\x01\n\x14GetWorkstationConfig\x12\x39.google.cloud.workstations.v1.GetWorkstationConfigRequest\x1a/.google.cloud.workstations.v1.WorkstationConfig\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}\x12\xf2\x01\n\x16ListWorkstationConfigs\x12;.google.cloud.workstations.v1.ListWorkstationConfigsRequest\x1a<.google.cloud.workstations.v1.ListWorkstationConfigsResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v1/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs\x12\x8f\x02\n\x1cListUsableWorkstationConfigs\x12\x41.google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest\x1a\x42.google.cloud.workstations.v1.ListUsableWorkstationConfigsResponse\"h\xda\x41\x06parent\x82\xd3\xe4\x93\x02Y\x12W/v1/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs:listUsable\x12\xbc\x02\n\x17\x43reateWorkstationConfig\x12<.google.cloud.workstations.v1.CreateWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc3\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41/parent,workstation_config,workstation_config_id\x82\xd3\xe4\x93\x02\x62\"L/v1/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs:\x12workstation_config\x12\xbe\x02\n\x17UpdateWorkstationConfig\x12<.google.cloud.workstations.v1.UpdateWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc5\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41\x1eworkstation_config,update_mask\x82\xd3\xe4\x93\x02u2_/v1/{workstation_config.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}:\x12workstation_config\x12\xfd\x01\n\x17\x44\x65leteWorkstationConfig\x12<.google.cloud.workstations.v1.DeleteWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02N*L/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}\x12\xdc\x01\n\x0eGetWorkstation\x12\x33.google.cloud.workstations.v1.GetWorkstationRequest\x1a).google.cloud.workstations.v1.Workstation\"j\xda\x41\x04name\x82\xd3\xe4\x93\x02]\x12[/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}\x12\xef\x01\n\x10ListWorkstations\x12\x35.google.cloud.workstations.v1.ListWorkstationsRequest\x1a\x36.google.cloud.workstations.v1.ListWorkstationsResponse\"l\xda\x41\x06parent\x82\xd3\xe4\x93\x02]\x12[/v1/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations\x12\x8c\x02\n\x16ListUsableWorkstations\x12;.google.cloud.workstations.v1.ListUsableWorkstationsRequest\x1a<.google.cloud.workstations.v1.ListUsableWorkstationsResponse\"w\xda\x41\x06parent\x82\xd3\xe4\x93\x02h\x12\x66/v1/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations:listUsable\x12\xa4\x02\n\x11\x43reateWorkstation\x12\x36.google.cloud.workstations.v1.CreateWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\xb7\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41!parent,workstation,workstation_id\x82\xd3\xe4\x93\x02j\"[/v1/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations:\x0bworkstation\x12\xa6\x02\n\x11UpdateWorkstation\x12\x36.google.cloud.workstations.v1.UpdateWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\xb9\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x17workstation,update_mask\x82\xd3\xe4\x93\x02v2g/v1/{workstation.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:\x0bworkstation\x12\xfa\x01\n\x11\x44\x65leteWorkstation\x12\x36.google.cloud.workstations.v1.DeleteWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02]*[/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}\x12\x81\x02\n\x10StartWorkstation\x12\x35.google.cloud.workstations.v1.StartWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x96\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x66\"a/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:start:\x01*\x12\xfe\x01\n\x0fStopWorkstation\x12\x34.google.cloud.workstations.v1.StopWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x95\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x65\"`/v1/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:stop:\x01*\x12\x9c\x02\n\x13GenerateAccessToken\x12\x38.google.cloud.workstations.v1.GenerateAccessTokenRequest\x1a\x39.google.cloud.workstations.v1.GenerateAccessTokenResponse\"\x8f\x01\xda\x41\x0bworkstation\x82\xd3\xe4\x93\x02{\"v/v1/{workstation=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:generateAccessToken:\x01*\x1aO\xca\x41\x1bworkstations.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB}\n com.google.cloud.workstations.v1B\x11WorkstationsProtoP\x01ZDcloud.google.com/go/workstations/apiv1/workstationspb;workstationspbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.rpc.Status", "google/rpc/status.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Workstations - module V1 - WorkstationCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster").msgclass - WorkstationCluster::PrivateClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationCluster.PrivateClusterConfig").msgclass - WorkstationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig").msgclass - WorkstationConfig::Host = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host").msgclass - WorkstationConfig::Host::GceInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance").msgclass - WorkstationConfig::Host::GceInstance::GceShieldedInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceShieldedInstanceConfig").msgclass - WorkstationConfig::Host::GceInstance::GceConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfig").msgclass - WorkstationConfig::PersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory").msgclass - WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk").msgclass - WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicy").enummodule - WorkstationConfig::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.Container").msgclass - WorkstationConfig::CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.CustomerEncryptionKey").msgclass - WorkstationConfig::ReadinessCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.WorkstationConfig.ReadinessCheck").msgclass - Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation").msgclass - Workstation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.Workstation.State").enummodule - GetWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GetWorkstationClusterRequest").msgclass - ListWorkstationClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationClustersRequest").msgclass - ListWorkstationClustersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationClustersResponse").msgclass - CreateWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.CreateWorkstationClusterRequest").msgclass - UpdateWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.UpdateWorkstationClusterRequest").msgclass - DeleteWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.DeleteWorkstationClusterRequest").msgclass - GetWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GetWorkstationConfigRequest").msgclass - ListWorkstationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationConfigsRequest").msgclass - ListWorkstationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationConfigsResponse").msgclass - ListUsableWorkstationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListUsableWorkstationConfigsRequest").msgclass - ListUsableWorkstationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListUsableWorkstationConfigsResponse").msgclass - CreateWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.CreateWorkstationConfigRequest").msgclass - UpdateWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.UpdateWorkstationConfigRequest").msgclass - DeleteWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.DeleteWorkstationConfigRequest").msgclass - GetWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GetWorkstationRequest").msgclass - ListWorkstationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationsRequest").msgclass - ListWorkstationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListWorkstationsResponse").msgclass - ListUsableWorkstationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListUsableWorkstationsRequest").msgclass - ListUsableWorkstationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.ListUsableWorkstationsResponse").msgclass - CreateWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.CreateWorkstationRequest").msgclass - UpdateWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.UpdateWorkstationRequest").msgclass - DeleteWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.DeleteWorkstationRequest").msgclass - StartWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.StartWorkstationRequest").msgclass - StopWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.StopWorkstationRequest").msgclass - GenerateAccessTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GenerateAccessTokenRequest").msgclass - GenerateAccessTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.GenerateAccessTokenResponse").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb b/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb deleted file mode 100644 index 023403299d59..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/lib/google/cloud/workstations/v1/workstations_services_pb.rb +++ /dev/null @@ -1,86 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/workstations/v1/workstations.proto for package 'google.cloud.workstations.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/workstations/v1/workstations_pb' - -module Google - module Cloud - module Workstations - module V1 - module Workstations - # Service for interacting with Cloud Workstations. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.workstations.v1.Workstations' - - # Returns the requested workstation cluster. - rpc :GetWorkstationCluster, ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest, ::Google::Cloud::Workstations::V1::WorkstationCluster - # Returns all workstation clusters in the specified location. - rpc :ListWorkstationClusters, ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest, ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse - # Creates a new workstation cluster. - rpc :CreateWorkstationCluster, ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest, ::Google::Longrunning::Operation - # Updates an existing workstation cluster. - rpc :UpdateWorkstationCluster, ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest, ::Google::Longrunning::Operation - # Deletes the specified workstation cluster. - rpc :DeleteWorkstationCluster, ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest, ::Google::Longrunning::Operation - # Returns the requested workstation configuration. - rpc :GetWorkstationConfig, ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest, ::Google::Cloud::Workstations::V1::WorkstationConfig - # Returns all workstation configurations in the specified cluster. - rpc :ListWorkstationConfigs, ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest, ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse - # Returns all workstation configurations in the specified cluster on which - # the caller has the "workstations.workstation.create" permission. - rpc :ListUsableWorkstationConfigs, ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest, ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse - # Creates a new workstation configuration. - rpc :CreateWorkstationConfig, ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest, ::Google::Longrunning::Operation - # Updates an existing workstation configuration. - rpc :UpdateWorkstationConfig, ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest, ::Google::Longrunning::Operation - # Deletes the specified workstation configuration. - rpc :DeleteWorkstationConfig, ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest, ::Google::Longrunning::Operation - # Returns the requested workstation. - rpc :GetWorkstation, ::Google::Cloud::Workstations::V1::GetWorkstationRequest, ::Google::Cloud::Workstations::V1::Workstation - # Returns all Workstations using the specified workstation configuration. - rpc :ListWorkstations, ::Google::Cloud::Workstations::V1::ListWorkstationsRequest, ::Google::Cloud::Workstations::V1::ListWorkstationsResponse - # Returns all workstations using the specified workstation configuration - # on which the caller has the "workstations.workstations.use" permission. - rpc :ListUsableWorkstations, ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest, ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse - # Creates a new workstation. - rpc :CreateWorkstation, ::Google::Cloud::Workstations::V1::CreateWorkstationRequest, ::Google::Longrunning::Operation - # Updates an existing workstation. - rpc :UpdateWorkstation, ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest, ::Google::Longrunning::Operation - # Deletes the specified workstation. - rpc :DeleteWorkstation, ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest, ::Google::Longrunning::Operation - # Starts running a workstation so that users can connect to it. - rpc :StartWorkstation, ::Google::Cloud::Workstations::V1::StartWorkstationRequest, ::Google::Longrunning::Operation - # Stops running a workstation, reducing costs. - rpc :StopWorkstation, ::Google::Cloud::Workstations::V1::StopWorkstationRequest, ::Google::Longrunning::Operation - # Returns a short-lived credential that can be used to send authenticated and - # authorized traffic to a workstation. - rpc :GenerateAccessToken, ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest, ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/README.md deleted file mode 100644 index 4081c926988b..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Workstations 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-workstations-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.rb deleted file mode 100644 index 97b65f828112..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/cloud/workstations/v1/workstations.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! - - -module Google - module Cloud - module Workstations - module V1 - # A workstation cluster resource in the Cloud Workstations API. - # - # Defines a group of workstations in a particular region and the - # VPC network they're attached to. - # @!attribute [rw] name - # @return [::String] - # Full name of this workstation cluster. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human-readable name for this workstation cluster. - # @!attribute [r] uid - # @return [::String] - # Output only. A system-assigned unique identifier for this workstation - # cluster. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Indicates whether this workstation cluster is currently being - # updated to match its intended state. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client-specified annotations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. - # [Labels](https://cloud.google.com/workstations/docs/label-resources) that - # are applied to the workstation cluster and that are also propagated to the - # underlying Compute Engine resources. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation cluster was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation cluster was most recently updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation cluster was soft-deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. Checksum computed by the server. May be sent on update and delete - # requests to make sure that the client has an up-to-date value before - # proceeding. - # @!attribute [rw] network - # @return [::String] - # Immutable. Name of the Compute Engine network in which instances associated - # with this workstation cluster will be created. - # @!attribute [rw] subnetwork - # @return [::String] - # Immutable. Name of the Compute Engine subnetwork in which instances - # associated with this workstation cluster will be created. Must be part of - # the subnetwork specified for this workstation cluster. - # @!attribute [r] control_plane_ip - # @return [::String] - # Output only. The private IP address of the control plane for this - # workstation cluster. Workstation VMs need access to this IP address to work - # with the service, so make sure that your firewall rules allow egress from - # the workstation VMs to this address. - # @!attribute [rw] private_cluster_config - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster::PrivateClusterConfig] - # Optional. Configuration for private workstation cluster. - # @!attribute [r] degraded - # @return [::Boolean] - # Output only. Whether this workstation cluster is in degraded mode, in which - # case it may require user action to restore full functionality. Details can - # be found in - # {::Google::Cloud::Workstations::V1::WorkstationCluster#conditions conditions}. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation cluster's current - # state. - class WorkstationCluster - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration options for private workstation clusters. - # @!attribute [rw] enable_private_endpoint - # @return [::Boolean] - # Immutable. Whether Workstations endpoint is private. - # @!attribute [r] cluster_hostname - # @return [::String] - # Output only. Hostname for the workstation cluster. This field will be - # populated only when private endpoint is enabled. To access workstations - # in the workstation cluster, create a new DNS zone mapping this domain - # name to an internal IP address and a forwarding rule mapping that address - # to the service attachment. - # @!attribute [r] service_attachment_uri - # @return [::String] - # Output only. Service attachment URI for the workstation cluster. The - # service attachemnt is created when private endpoint is enabled. To access - # workstations in the workstation cluster, configure access to the managed - # service using [Private Service - # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). - # @!attribute [rw] allowed_projects - # @return [::Array<::String>] - # Optional. Additional projects that are allowed to attach to the - # workstation cluster's service attachment. By default, the workstation - # cluster's project and the VPC host project (if different) are allowed. - class PrivateClusterConfig - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A workstation configuration resource in the Cloud Workstations API. - # - # Workstation configurations act as templates for workstations. The workstation - # configuration defines details such as the workstation virtual machine (VM) - # instance type, persistent storage, container image defining environment, - # which IDE or Code Editor to use, and more. Administrators and platform teams - # can also use [Identity and Access Management - # (IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to - # teams or to individual developers. - # @!attribute [rw] name - # @return [::String] - # Full name of this workstation configuration. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human-readable name for this workstation configuration. - # @!attribute [r] uid - # @return [::String] - # Output only. A system-assigned unique identifier for this workstation - # configuration. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Indicates whether this workstation configuration is currently - # being updated to match its intended state. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client-specified annotations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. - # [Labels](https://cloud.google.com/workstations/docs/label-resources) that - # are applied to the workstation configuration and that are also propagated - # to the underlying Compute Engine resources. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation configuration was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation configuration was most recently - # updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation configuration was soft-deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. Checksum computed by the server. May be sent on update and delete - # requests to make sure that the client has an up-to-date value before - # proceeding. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait before automatically stopping a - # workstation after it last received user traffic. - # - # A value of `"0s"` indicates that Cloud Workstations VMs created with this - # configuration should never time out due to idleness. - # Provide - # [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) - # terminated by `s` for seconds—for example, `"7200s"` (2 hours). - # The default is `"1200s"` (20 minutes). - # @!attribute [rw] running_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds that a workstation can run until it is - # automatically shut down. We recommend that workstations be shut down daily - # to reduce costs and so that security updates can be applied upon restart. - # The - # {::Google::Cloud::Workstations::V1::WorkstationConfig#idle_timeout idle_timeout} - # and - # {::Google::Cloud::Workstations::V1::WorkstationConfig#running_timeout running_timeout} - # fields are independent of each other. Note that the - # {::Google::Cloud::Workstations::V1::WorkstationConfig#running_timeout running_timeout} - # field shuts down VMs after the specified time, regardless of whether or not - # the VMs are idle. - # - # Provide duration terminated by `s` for seconds—for example, `"54000s"` - # (15 hours). Defaults to `"43200s"` (12 hours). A value of `"0s"` indicates - # that workstations using this configuration should never time out. If - # {::Google::Cloud::Workstations::V1::WorkstationConfig#encryption_key encryption_key} - # is set, it must be greater than `"0s"` and less than - # `"86400s"` (24 hours). - # - # Warning: A value of `"0s"` indicates that Cloud Workstations VMs created - # with this configuration have no maximum running time. This is strongly - # discouraged because you incur costs and will not pick up security updates. - # @!attribute [rw] host - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Host] - # Optional. Runtime host for the workstation. - # @!attribute [rw] persistent_directories - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory>] - # Optional. Directories to persist across workstation sessions. - # @!attribute [rw] container - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Container] - # Optional. Container that runs upon startup for each workstation using this - # workstation configuration. - # @!attribute [rw] encryption_key - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::CustomerEncryptionKey] - # Immutable. Encrypts resources of this workstation configuration using a - # customer-managed encryption key (CMEK). - # - # If specified, the boot disk of the Compute Engine instance and the - # persistent disk are encrypted using this encryption key. If - # this field is not set, the disks are encrypted using a generated - # key. Customer-managed encryption keys do not protect disk metadata. - # - # If the customer-managed encryption key is rotated, when the workstation - # instance is stopped, the system attempts to recreate the - # persistent disk with the new version of the key. Be sure to keep - # older versions of the key until the persistent disk is recreated. - # Otherwise, data on the persistent disk might be lost. - # - # If the encryption key is revoked, the workstation session automatically - # stops within 7 hours. - # - # Immutable after the workstation configuration is created. - # @!attribute [rw] readiness_checks - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig::ReadinessCheck>] - # Optional. Readiness checks to perform when starting a workstation using - # this workstation configuration. Mark a workstation as running only after - # all specified readiness checks return 200 status codes. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # Optional. Immutable. Specifies the zones used to replicate the VM and disk - # resources within the region. If set, exactly two zones within the - # workstation cluster's region must be specified—for example, - # `['us-central1-a', 'us-central1-f']`. If this field is empty, two default - # zones within the region are used. - # - # Immutable after the workstation configuration is created. - # @!attribute [r] degraded - # @return [::Boolean] - # Output only. Whether this resource is degraded, in which case it may - # require user action to restore full functionality. See also the - # {::Google::Cloud::Workstations::V1::WorkstationConfig#conditions conditions} - # field. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the current resource state. - class WorkstationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Runtime host for a workstation. - # @!attribute [rw] gce_instance - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance] - # Specifies a Compute Engine instance as the host. - class Host - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A runtime using a Compute Engine instance. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. The type of machine to use for VM instances—for example, - # `"e2-standard-4"`. For more information about machine types that - # Cloud Workstations supports, see the list of - # [available machine - # types](https://cloud.google.com/workstations/docs/available-machine-types). - # @!attribute [rw] service_account - # @return [::String] - # Optional. The email address of the service account for Cloud - # Workstations VMs created with this configuration. When specified, be - # sure that the service account has `logginglogEntries.create` permission - # on the project so it can write logs out to Cloud Logging. If using a - # custom container image, the service account must have permissions to - # pull the specified image. - # - # If you as the administrator want to be able to `ssh` into the - # underlying VM, you need to set this value to a service account - # for which you have the `iam.serviceAccounts.actAs` permission. - # Conversely, if you don't want anyone to be able to `ssh` into the - # underlying VM, use a service account where no one has that - # permission. - # - # If not set, VMs run with a service account provided by the - # Cloud Workstations service, and the image must be publicly - # accessible. - # @!attribute [rw] service_account_scopes - # @return [::Array<::String>] - # Optional. Scopes to grant to the - # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance#service_account service_account}. - # Various scopes are automatically added based on feature usage. When - # specified, users of workstations under this configuration must have - # `iam.serviceAccounts.actAs` on the service account. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Optional. Network tags to add to the Compute Engine VMs backing the - # workstations. This option applies - # [network - # tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs - # created with this configuration. These network tags enable the creation - # of [firewall - # rules](https://cloud.google.com/workstations/docs/configure-firewall-rules). - # @!attribute [rw] pool_size - # @return [::Integer] - # Optional. The number of VMs that the system should keep idle so that - # new workstations can be started quickly for new users. Defaults to `0` - # in the API. - # @!attribute [r] pooled_instances - # @return [::Integer] - # Output only. Number of instances currently available in the pool for - # faster workstation startup. - # @!attribute [rw] disable_public_ip_addresses - # @return [::Boolean] - # Optional. When set to true, disables public IP addresses for VMs. If - # you disable public IP addresses, you must set up Private Google Access - # or Cloud NAT on your network. If you use Private Google Access and you - # use `private.googleapis.com` or `restricted.googleapis.com` for - # Container Registry and Artifact Registry, make sure that you set - # up DNS records for domains `*.gcr.io` and `*.pkg.dev`. - # Defaults to false (VMs have public IP addresses). - # @!attribute [rw] enable_nested_virtualization - # @return [::Boolean] - # Optional. Whether to enable nested virtualization on Cloud Workstations - # VMs created under this workstation configuration. - # - # Nested virtualization lets you run virtual machine (VM) instances - # inside your workstation. Before enabling nested virtualization, - # consider the following important considerations. Cloud Workstations - # instances are subject to the [same restrictions as Compute Engine - # instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): - # - # * **Organization policy**: projects, folders, or - # organizations may be restricted from creating nested VMs if the - # **Disable VM nested virtualization** constraint is enforced in - # the organization policy. For more information, see the - # Compute Engine section, - # [Checking whether nested virtualization is - # allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). - # * **Performance**: nested VMs might experience a 10% or greater - # decrease in performance for workloads that are CPU-bound and - # possibly greater than a 10% decrease for workloads that are - # input/output bound. - # * **Machine Type**: nested virtualization can only be enabled on - # workstation configurations that specify a - # {::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance#machine_type machine_type} - # in the N1 or N2 machine series. - # * **GPUs**: nested virtualization may not be enabled on workstation - # configurations with accelerators. - # * **Operating System**: Because - # [Container-Optimized - # OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) - # does not support nested virtualization, when nested virtualization is - # enabled, the underlying Compute Engine VM instances boot from an - # [Ubuntu - # LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) - # image. - # @!attribute [rw] shielded_instance_config - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::GceShieldedInstanceConfig] - # Optional. A set of Compute Engine Shielded instance options. - # @!attribute [rw] confidential_instance_config - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::Host::GceInstance::GceConfidentialInstanceConfig] - # Optional. A set of Compute Engine Confidential VM instance options. - # @!attribute [rw] boot_disk_size_gb - # @return [::Integer] - # Optional. The size of the boot disk for the VM in gigabytes (GB). - # The minimum boot disk size is `30` GB. Defaults to `50` GB. - class GceInstance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A set of Compute Engine Shielded instance options. - # @!attribute [rw] enable_secure_boot - # @return [::Boolean] - # Optional. Whether the instance has Secure Boot enabled. - # @!attribute [rw] enable_vtpm - # @return [::Boolean] - # Optional. Whether the instance has the vTPM enabled. - # @!attribute [rw] enable_integrity_monitoring - # @return [::Boolean] - # Optional. Whether the instance has integrity monitoring enabled. - class GceShieldedInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of Compute Engine Confidential VM instance options. - # @!attribute [rw] enable_confidential_compute - # @return [::Boolean] - # Optional. Whether the instance has confidential compute enabled. - class GceConfidentialInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # A directory to persist across workstation sessions. - # @!attribute [rw] gce_pd - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] - # A PersistentDirectory backed by a Compute Engine persistent disk. - # @!attribute [rw] mount_path - # @return [::String] - # Optional. Location of this directory in the running workstation. - class PersistentDirectory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A PersistentDirectory backed by a Compute Engine regional persistent - # disk. The - # {::Google::Cloud::Workstations::V1::WorkstationConfig#persistent_directories persistent_directories} - # field is repeated, but it may contain only one entry. It creates a - # [persistent - # disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that - # mounts to the workstation VM at `/home` when the session starts and - # detaches when the session ends. If this field is empty, workstations - # created with this configuration do not have a persistent home - # directory. - # @!attribute [rw] size_gb - # @return [::Integer] - # Optional. The GB capacity of a persistent home directory for each - # workstation created with this configuration. Must be empty if - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot source_snapshot} - # is set. - # - # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. - # Defaults to `200`. If less than `200` GB, the - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#disk_type disk_type} - # must be - # `"pd-balanced"` or `"pd-ssd"`. - # @!attribute [rw] fs_type - # @return [::String] - # Optional. Type of file system that the disk should be formatted with. - # The workstation image must support this file system type. Must be empty - # if - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot source_snapshot} - # is set. Defaults to `"ext4"`. - # @!attribute [rw] disk_type - # @return [::String] - # Optional. The [type of the persistent - # disk](https://cloud.google.com/compute/docs/disks#disk-types) for the - # home directory. Defaults to `"pd-standard"`. - # @!attribute [rw] source_snapshot - # @return [::String] - # Optional. Name of the snapshot to use as the source for the disk. If - # set, - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#size_gb size_gb} - # and - # {::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#fs_type fs_type} - # must be empty. - # @!attribute [rw] reclaim_policy - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy] - # Optional. Whether the persistent disk should be deleted when the - # workstation is deleted. Valid values are `DELETE` and `RETAIN`. - # Defaults to `DELETE`. - class GceRegionalPersistentDisk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value representing what should happen to the disk after the workstation - # is deleted. - module ReclaimPolicy - # Do not use. - RECLAIM_POLICY_UNSPECIFIED = 0 - - # Delete the persistent disk when deleting the workstation. - DELETE = 1 - - # Keep the persistent disk when deleting the workstation. - # An administrator must manually delete the disk. - RETAIN = 2 - end - end - end - - # A Docker container. - # @!attribute [rw] image - # @return [::String] - # Optional. A Docker container image that defines a custom environment. - # - # Cloud Workstations provides a number of - # [preconfigured - # images](https://cloud.google.com/workstations/docs/preconfigured-base-images), - # but you can create your own - # [custom container - # images](https://cloud.google.com/workstations/docs/custom-container-images). - # If using a private image, the `host.gceInstance.serviceAccount` field - # must be specified in the workstation configuration and must have - # permission to pull the specified image. Otherwise, the image must be - # publicly accessible. - # @!attribute [rw] command - # @return [::Array<::String>] - # Optional. If set, overrides the default ENTRYPOINT specified by the - # image. - # @!attribute [rw] args - # @return [::Array<::String>] - # Optional. Arguments passed to the entrypoint. - # @!attribute [rw] env - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Environment variables passed to the container's entrypoint. - # @!attribute [rw] working_dir - # @return [::String] - # Optional. If set, overrides the default DIR specified by the image. - # @!attribute [rw] run_as_user - # @return [::Integer] - # Optional. If set, overrides the USER specified in the image with the - # given uid. - class Container - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class EnvEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A customer-managed encryption key (CMEK) for the Compute Engine - # resources of the associated workstation configuration. Specify the name of - # your Cloud KMS encryption key and the default service account. - # We recommend that you use a separate service account and follow - # [Cloud KMS best - # practices](https://cloud.google.com/kms/docs/separation-of-duties). - # @!attribute [rw] kms_key - # @return [::String] - # Immutable. The name of the Google Cloud KMS encryption key. For example, - # `"projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME"`. - # The key must be in the same region as the workstation configuration. - # @!attribute [rw] kms_key_service_account - # @return [::String] - # Immutable. The service account to use with the specified - # KMS key. We recommend that you use a separate service account - # and follow KMS best practices. For more information, see - # [Separation of - # duties](https://cloud.google.com/kms/docs/separation-of-duties) and - # `gcloud kms keys add-iam-policy-binding` - # [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member). - class CustomerEncryptionKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A readiness check to be performed on a workstation. - # @!attribute [rw] path - # @return [::String] - # Optional. Path to which the request should be sent. - # @!attribute [rw] port - # @return [::Integer] - # Optional. Port to which the request should be sent. - class ReadinessCheck - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A single instance of a developer workstation with its own persistent storage. - # @!attribute [rw] name - # @return [::String] - # Full name of this workstation. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human-readable name for this workstation. - # @!attribute [r] uid - # @return [::String] - # Output only. A system-assigned unique identifier for this workstation. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Indicates whether this workstation is currently being updated - # to match its intended state. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client-specified annotations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. - # [Labels](https://cloud.google.com/workstations/docs/label-resources) that - # are applied to the workstation and that are also propagated to the - # underlying Compute Engine resources. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation was most recently updated. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation was most recently successfully - # started, regardless of the workstation's initial state. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation was soft-deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. Checksum computed by the server. May be sent on update and delete - # requests to make sure that the client has an up-to-date value before - # proceeding. - # @!attribute [r] state - # @return [::Google::Cloud::Workstations::V1::Workstation::State] - # Output only. Current state of the workstation. - # @!attribute [r] host - # @return [::String] - # Output only. Host to which clients can send HTTPS traffic that will be - # received by the workstation. Authorized traffic will be received to the - # workstation as HTTP on port 80. To send traffic to a different port, - # clients may prefix the host with the destination port in the format - # `{port}-{host}`. - class Workstation - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Whether a workstation is running and ready to receive user requests. - module State - # Do not use. - STATE_UNSPECIFIED = 0 - - # The workstation is not yet ready to accept requests from users but will - # be soon. - STATE_STARTING = 1 - - # The workstation is ready to accept requests from users. - STATE_RUNNING = 2 - - # The workstation is being stopped. - STATE_STOPPING = 3 - - # The workstation is stopped and will not be able to receive requests until - # it is started. - STATE_STOPPED = 4 - end - end - - # Request message for GetWorkstationCluster. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested resource. - class GetWorkstationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListWorkstationClusters. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListWorkstationClustersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListWorkstationClusters. - # @!attribute [rw] workstation_clusters - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationCluster>] - # The requested workstation clusters. - # @!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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. - class ListWorkstationClustersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a CreateWorkstationCluster. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] workstation_cluster_id - # @return [::String] - # Required. ID to use for the workstation cluster. - # @!attribute [rw] workstation_cluster - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] - # Required. Workstation cluster to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - class CreateWorkstationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateWorkstationCluster. - # @!attribute [rw] workstation_cluster - # @return [::Google::Cloud::Workstations::V1::WorkstationCluster] - # Required. Workstation cluster to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask that specifies which fields in the workstation cluster - # should be updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set, and the workstation cluster is not found, a new - # workstation cluster will be created. In this situation, update_mask is - # ignored. - class UpdateWorkstationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a workstation cluster. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation cluster to delete. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation cluster on the server does not have this ETag. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set, any workstation configurations and workstations in the - # workstation cluster are also deleted. Otherwise, the request only - # works if the workstation cluster has no configurations or workstations. - class DeleteWorkstationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetWorkstationConfig. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested resource. - class GetWorkstationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListWorkstationConfigs. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListWorkstationConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListWorkstationConfigs. - # @!attribute [rw] workstation_configs - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig>] - # The requested configs. - # @!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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. - class ListWorkstationConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListUsableWorkstationConfigs. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListUsableWorkstationConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListUsableWorkstationConfigs. - # @!attribute [rw] workstation_configs - # @return [::Array<::Google::Cloud::Workstations::V1::WorkstationConfig>] - # The requested configs. - # @!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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. - class ListUsableWorkstationConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a CreateWorkstationConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] workstation_config_id - # @return [::String] - # Required. ID to use for the workstation configuration. - # @!attribute [rw] workstation_config - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] - # Required. Config to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - class CreateWorkstationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateWorkstationConfig. - # @!attribute [rw] workstation_config - # @return [::Google::Cloud::Workstations::V1::WorkstationConfig] - # Required. Config to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration will be created. In this situation, - # update_mask is ignored. - class UpdateWorkstationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a workstation configuration. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation configuration to delete. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request is rejected if the latest version of the - # workstation configuration on the server does not have this ETag. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set, any workstations in the workstation configuration are - # also deleted. Otherwise, the request works only if the workstation - # configuration has no workstations. - class DeleteWorkstationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetWorkstation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested resource. - class GetWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListWorkstations. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListWorkstationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListWorkstations. - # @!attribute [rw] workstations - # @return [::Array<::Google::Cloud::Workstations::V1::Workstation>] - # The requested workstations. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. 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>] - # Optional. Unreachable resources. - class ListWorkstationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListUsableWorkstations. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListUsableWorkstationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListUsableWorkstations. - # @!attribute [rw] workstations - # @return [::Array<::Google::Cloud::Workstations::V1::Workstation>] - # The requested workstations. - # @!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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. - class ListUsableWorkstationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a CreateWorkstation. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] workstation_id - # @return [::String] - # Required. ID to use for the workstation. - # @!attribute [rw] workstation - # @return [::Google::Cloud::Workstations::V1::Workstation] - # Required. Workstation to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - class CreateWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateWorkstation. - # @!attribute [rw] workstation - # @return [::Google::Cloud::Workstations::V1::Workstation] - # Required. Workstation to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration is created. In this situation, update_mask - # is ignored. - class UpdateWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteWorkstation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation to delete. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - class DeleteWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for StartWorkstation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation to start. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - class StartWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for StopWorkstation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation to stop. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - class StopWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GenerateAccessToken. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Desired expiration time of the access token. This value must - # be at most 24 hours in the future. If a value is not specified, the - # token's expiration time will be set to a default value of 1 hour in the - # future. - # - # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ttl - # @return [::Google::Protobuf::Duration] - # Desired lifetime duration of the access token. This value must - # be at most 24 hours. If a value is not specified, the token's lifetime - # will be set to a default value of 1 hour. - # - # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] workstation - # @return [::String] - # Required. Name of the workstation for which the access token should be - # generated. - class GenerateAccessTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for GenerateAccessToken. - # @!attribute [rw] access_token - # @return [::String] - # The generated bearer access token. To use this token, include it in an - # Authorization header of an HTTP request sent to the associated - # workstation's hostname—for example, `Authorization: Bearer - # `. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Time at which the generated token will expire. - class GenerateAccessTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for long-running operations. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time that the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time that 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. - # @!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-workstations-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-workstations-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-workstations-v1/snippets/Gemfile deleted file mode 100644 index a1469457e584..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1", path: "../" -else - gem "google-cloud-workstations-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-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json b/owl-bot-staging/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json deleted file mode 100644 index e900c252d0bb..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/snippet_metadata_google.cloud.workstations.v1.json +++ /dev/null @@ -1,815 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-workstations-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.workstations.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "workstations_v1_generated_Workstations_GetWorkstationCluster_sync", - "title": "Snippet for the get_workstation_cluster call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_cluster.", - "file": "workstations/get_workstation_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workstation_cluster", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1::WorkstationCluster", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "GetWorkstationCluster", - "full_name": "google.cloud.workstations.v1.Workstations.GetWorkstationCluster", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_ListWorkstationClusters_sync", - "title": "Snippet for the list_workstation_clusters call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_clusters.", - "file": "workstations/list_workstation_clusters.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workstation_clusters", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_clusters", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "ListWorkstationClusters", - "full_name": "google.cloud.workstations.v1.Workstations.ListWorkstationClusters", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_CreateWorkstationCluster_sync", - "title": "Snippet for the create_workstation_cluster call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_cluster.", - "file": "workstations/create_workstation_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workstation_cluster", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "CreateWorkstationCluster", - "full_name": "google.cloud.workstations.v1.Workstations.CreateWorkstationCluster", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_UpdateWorkstationCluster_sync", - "title": "Snippet for the update_workstation_cluster call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_cluster.", - "file": "workstations/update_workstation_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workstation_cluster", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "UpdateWorkstationCluster", - "full_name": "google.cloud.workstations.v1.Workstations.UpdateWorkstationCluster", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_DeleteWorkstationCluster_sync", - "title": "Snippet for the delete_workstation_cluster call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_cluster.", - "file": "workstations/delete_workstation_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workstation_cluster", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "DeleteWorkstationCluster", - "full_name": "google.cloud.workstations.v1.Workstations.DeleteWorkstationCluster", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_GetWorkstationConfig_sync", - "title": "Snippet for the get_workstation_config call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_config.", - "file": "workstations/get_workstation_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workstation_config", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1::WorkstationConfig", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "GetWorkstationConfig", - "full_name": "google.cloud.workstations.v1.Workstations.GetWorkstationConfig", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_ListWorkstationConfigs_sync", - "title": "Snippet for the list_workstation_configs call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_configs.", - "file": "workstations/list_workstation_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workstation_configs", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "ListWorkstationConfigs", - "full_name": "google.cloud.workstations.v1.Workstations.ListWorkstationConfigs", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_ListUsableWorkstationConfigs_sync", - "title": "Snippet for the list_usable_workstation_configs call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstation_configs.", - "file": "workstations/list_usable_workstation_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_usable_workstation_configs", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstation_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "ListUsableWorkstationConfigs", - "full_name": "google.cloud.workstations.v1.Workstations.ListUsableWorkstationConfigs", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_CreateWorkstationConfig_sync", - "title": "Snippet for the create_workstation_config call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_config.", - "file": "workstations/create_workstation_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workstation_config", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "CreateWorkstationConfig", - "full_name": "google.cloud.workstations.v1.Workstations.CreateWorkstationConfig", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_UpdateWorkstationConfig_sync", - "title": "Snippet for the update_workstation_config call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_config.", - "file": "workstations/update_workstation_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workstation_config", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "UpdateWorkstationConfig", - "full_name": "google.cloud.workstations.v1.Workstations.UpdateWorkstationConfig", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_DeleteWorkstationConfig_sync", - "title": "Snippet for the delete_workstation_config call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_config.", - "file": "workstations/delete_workstation_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workstation_config", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "DeleteWorkstationConfig", - "full_name": "google.cloud.workstations.v1.Workstations.DeleteWorkstationConfig", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_GetWorkstation_sync", - "title": "Snippet for the get_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#get_workstation.", - "file": "workstations/get_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workstation", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#get_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::GetWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1::Workstation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "GetWorkstation", - "full_name": "google.cloud.workstations.v1.Workstations.GetWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_ListWorkstations_sync", - "title": "Snippet for the list_workstations call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_workstations.", - "file": "workstations/list_workstations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workstations", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_workstations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::ListWorkstationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1::ListWorkstationsResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "ListWorkstations", - "full_name": "google.cloud.workstations.v1.Workstations.ListWorkstations", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_ListUsableWorkstations_sync", - "title": "Snippet for the list_usable_workstations call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstations.", - "file": "workstations/list_usable_workstations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_usable_workstations", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "ListUsableWorkstations", - "full_name": "google.cloud.workstations.v1.Workstations.ListUsableWorkstations", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_CreateWorkstation_sync", - "title": "Snippet for the create_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#create_workstation.", - "file": "workstations/create_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workstation", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#create_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::CreateWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "CreateWorkstation", - "full_name": "google.cloud.workstations.v1.Workstations.CreateWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_UpdateWorkstation_sync", - "title": "Snippet for the update_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#update_workstation.", - "file": "workstations/update_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workstation", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#update_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::UpdateWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "UpdateWorkstation", - "full_name": "google.cloud.workstations.v1.Workstations.UpdateWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_DeleteWorkstation_sync", - "title": "Snippet for the delete_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation.", - "file": "workstations/delete_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workstation", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::DeleteWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "DeleteWorkstation", - "full_name": "google.cloud.workstations.v1.Workstations.DeleteWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_StartWorkstation_sync", - "title": "Snippet for the start_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#start_workstation.", - "file": "workstations/start_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_workstation", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#start_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::StartWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "StartWorkstation", - "full_name": "google.cloud.workstations.v1.Workstations.StartWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_StopWorkstation_sync", - "title": "Snippet for the stop_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#stop_workstation.", - "file": "workstations/stop_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "stop_workstation", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#stop_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::StopWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "StopWorkstation", - "full_name": "google.cloud.workstations.v1.Workstations.StopWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1_generated_Workstations_GenerateAccessToken_sync", - "title": "Snippet for the generate_access_token call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1::Workstations::Client#generate_access_token.", - "file": "workstations/generate_access_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_access_token", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client#generate_access_token", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1::Workstations::Client" - }, - "method": { - "short_name": "GenerateAccessToken", - "full_name": "google.cloud.workstations.v1.Workstations.GenerateAccessToken", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1.Workstations" - } - } - }, - "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-workstations-v1/snippets/workstations/create_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation.rb deleted file mode 100644 index 4031f08e9005..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation.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 workstations_v1_generated_Workstations_CreateWorkstation_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the create_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#create_workstation. -# -def create_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::CreateWorkstationRequest.new - - # Call the create_workstation method. - result = client.create_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_CreateWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.rb deleted file mode 100644 index 6920a957ca47..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_cluster.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 workstations_v1_generated_Workstations_CreateWorkstationCluster_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the create_workstation_cluster call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_cluster. -# -def create_workstation_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new - - # Call the create_workstation_cluster method. - result = client.create_workstation_cluster request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_CreateWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb deleted file mode 100644 index a4ee1a5ba3bd..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/create_workstation_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1_generated_Workstations_CreateWorkstationConfig_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the create_workstation_config call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#create_workstation_config. -# -def create_workstation_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new - - # Call the create_workstation_config method. - result = client.create_workstation_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_CreateWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation.rb deleted file mode 100644 index 81660ff7e383..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation.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 workstations_v1_generated_Workstations_DeleteWorkstation_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the delete_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation. -# -def delete_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new - - # Call the delete_workstation method. - result = client.delete_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_DeleteWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.rb deleted file mode 100644 index 979c4987b36e..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_cluster.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 workstations_v1_generated_Workstations_DeleteWorkstationCluster_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the delete_workstation_cluster call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_cluster. -# -def delete_workstation_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new - - # Call the delete_workstation_cluster method. - result = client.delete_workstation_cluster request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_DeleteWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb deleted file mode 100644 index 282347e33b9b..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/delete_workstation_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1_generated_Workstations_DeleteWorkstationConfig_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the delete_workstation_config call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#delete_workstation_config. -# -def delete_workstation_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new - - # Call the delete_workstation_config method. - result = client.delete_workstation_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_DeleteWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb deleted file mode 100644 index 5ee1e774fee1..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/generate_access_token.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1_generated_Workstations_GenerateAccessToken_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the generate_access_token call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#generate_access_token. -# -def generate_access_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new - - # Call the generate_access_token method. - result = client.generate_access_token request - - # The returned object is of type Google::Cloud::Workstations::V1::GenerateAccessTokenResponse. - p result -end -# [END workstations_v1_generated_Workstations_GenerateAccessToken_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb deleted file mode 100644 index 3f39180ba50d..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1_generated_Workstations_GetWorkstation_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the get_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#get_workstation. -# -def get_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::GetWorkstationRequest.new - - # Call the get_workstation method. - result = client.get_workstation request - - # The returned object is of type Google::Cloud::Workstations::V1::Workstation. - p result -end -# [END workstations_v1_generated_Workstations_GetWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb deleted file mode 100644 index 439839d2c17f..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_cluster.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1_generated_Workstations_GetWorkstationCluster_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the get_workstation_cluster call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_cluster. -# -def get_workstation_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new - - # Call the get_workstation_cluster method. - result = client.get_workstation_cluster request - - # The returned object is of type Google::Cloud::Workstations::V1::WorkstationCluster. - p result -end -# [END workstations_v1_generated_Workstations_GetWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_config.rb deleted file mode 100644 index 03403b54417f..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/get_workstation_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 workstations_v1_generated_Workstations_GetWorkstationConfig_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the get_workstation_config call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#get_workstation_config. -# -def get_workstation_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new - - # Call the get_workstation_config method. - result = client.get_workstation_config request - - # The returned object is of type Google::Cloud::Workstations::V1::WorkstationConfig. - p result -end -# [END workstations_v1_generated_Workstations_GetWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_configs.rb deleted file mode 100644 index b829c05c865c..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstation_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 workstations_v1_generated_Workstations_ListUsableWorkstationConfigs_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the list_usable_workstation_configs call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstation_configs. -# -def list_usable_workstation_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new - - # Call the list_usable_workstation_configs method. - result = client.list_usable_workstation_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::Workstations::V1::WorkstationConfig. - p item - end -end -# [END workstations_v1_generated_Workstations_ListUsableWorkstationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb deleted file mode 100644 index d7266f51ca88..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_usable_workstations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1_generated_Workstations_ListUsableWorkstations_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the list_usable_workstations call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#list_usable_workstations. -# -def list_usable_workstations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new - - # Call the list_usable_workstations method. - result = client.list_usable_workstations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. - p item - end -end -# [END workstations_v1_generated_Workstations_ListUsableWorkstations_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb deleted file mode 100644 index 4234e04c9aee..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_clusters.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1_generated_Workstations_ListWorkstationClusters_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the list_workstation_clusters call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_clusters. -# -def list_workstation_clusters - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new - - # Call the list_workstation_clusters method. - result = client.list_workstation_clusters request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Workstations::V1::WorkstationCluster. - p item - end -end -# [END workstations_v1_generated_Workstations_ListWorkstationClusters_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_configs.rb deleted file mode 100644 index 8810eb261cd2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstation_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 workstations_v1_generated_Workstations_ListWorkstationConfigs_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the list_workstation_configs call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#list_workstation_configs. -# -def list_workstation_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new - - # Call the list_workstation_configs method. - result = client.list_workstation_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::Workstations::V1::WorkstationConfig. - p item - end -end -# [END workstations_v1_generated_Workstations_ListWorkstationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb deleted file mode 100644 index f667c3ea7346..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/list_workstations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1_generated_Workstations_ListWorkstations_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the list_workstations call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#list_workstations. -# -def list_workstations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::ListWorkstationsRequest.new - - # Call the list_workstations method. - result = client.list_workstations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Workstations::V1::Workstation. - p item - end -end -# [END workstations_v1_generated_Workstations_ListWorkstations_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/start_workstation.rb deleted file mode 100644 index 8e9f7ff1738c..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/start_workstation.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 workstations_v1_generated_Workstations_StartWorkstation_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the start_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#start_workstation. -# -def start_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::StartWorkstationRequest.new - - # Call the start_workstation method. - result = client.start_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_StartWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/stop_workstation.rb deleted file mode 100644 index 938fb5a5843f..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/stop_workstation.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 workstations_v1_generated_Workstations_StopWorkstation_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the stop_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#stop_workstation. -# -def stop_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::StopWorkstationRequest.new - - # Call the stop_workstation method. - result = client.stop_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_StopWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation.rb deleted file mode 100644 index 7b34ea13f4bb..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation.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 workstations_v1_generated_Workstations_UpdateWorkstation_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the update_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#update_workstation. -# -def update_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new - - # Call the update_workstation method. - result = client.update_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_UpdateWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.rb deleted file mode 100644 index b2c9b129aa80..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_cluster.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 workstations_v1_generated_Workstations_UpdateWorkstationCluster_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the update_workstation_cluster call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_cluster. -# -def update_workstation_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new - - # Call the update_workstation_cluster method. - result = client.update_workstation_cluster request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_UpdateWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb deleted file mode 100644 index f2129ee535ec..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/snippets/workstations/update_workstation_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1_generated_Workstations_UpdateWorkstationConfig_sync] -require "google/cloud/workstations/v1" - -## -# Snippet for the update_workstation_config call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1::Workstations::Client#update_workstation_config. -# -def update_workstation_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new - - # Call the update_workstation_config method. - result = client.update_workstation_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1_generated_Workstations_UpdateWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_operations_test.rb deleted file mode 100644 index c0aa5969d1f8..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_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/workstations/v1/workstations_pb" -require "google/cloud/workstations/v1/workstations_services_pb" -require "google/cloud/workstations/v1/workstations" - -class ::Google::Cloud::Workstations::V1::Workstations::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Workstations::V1::Workstations::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::Workstations::V1::Workstations::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_paths_test.rb deleted file mode 100644 index 2411b91ff053..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_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/workstations/v1/workstations" - -class ::Google::Cloud::Workstations::V1::Workstations::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::Workstations::V1::Workstations::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_workstation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workstation_path project: "value0", location: "value1", workstation_cluster: "value2", workstation_config: "value3", workstation: "value4" - assert_equal "projects/value0/locations/value1/workstationClusters/value2/workstationConfigs/value3/workstations/value4", path - end - end - - def test_workstation_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::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workstation_cluster_path project: "value0", location: "value1", workstation_cluster: "value2" - assert_equal "projects/value0/locations/value1/workstationClusters/value2", path - end - end - - def test_workstation_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::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workstation_config_path project: "value0", location: "value1", workstation_cluster: "value2", workstation_config: "value3" - assert_equal "projects/value0/locations/value1/workstationClusters/value2/workstationConfigs/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb deleted file mode 100644 index 3ac48d97c0c7..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_rest_test.rb +++ /dev/null @@ -1,1220 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/workstations/v1/workstations_pb" -require "google/cloud/workstations/v1/workstations/rest" - - -class ::Google::Cloud::Workstations::V1::Workstations::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_workstation_cluster - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1::WorkstationCluster.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workstation_cluster({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workstation_cluster name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workstation_cluster ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workstation_cluster({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workstation_cluster(::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workstation_cluster_client_stub.call_count - end - end - end - - def test_list_workstation_clusters - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse.new - http_response = OpenStruct.new 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_workstation_clusters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_workstation_clusters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workstation_clusters_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.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_workstation_clusters_client_stub.call_count - end - end - end - - def test_create_workstation_cluster - # Create test objects. - 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" - workstation_cluster_id = "hello world" - workstation_cluster = {} - validate_only = true - - create_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workstation_cluster parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workstation_cluster ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workstation_cluster(::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workstation_cluster_client_stub.call_count - end - end - end - - def test_update_workstation_cluster - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workstation_cluster = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workstation_cluster workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workstation_cluster ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workstation_cluster(::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workstation_cluster_client_stub.call_count - end - end - end - - def test_delete_workstation_cluster - # Create test objects. - 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" - validate_only = true - etag = "hello world" - force = true - - delete_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workstation_cluster name: name, validate_only: validate_only, etag: etag, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workstation_cluster ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workstation_cluster(::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workstation_cluster_client_stub.call_count - end - end - end - - def test_get_workstation_config - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1::WorkstationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workstation_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workstation_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workstation_config ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workstation_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workstation_config(::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workstation_config_client_stub.call_count - end - end - end - - def test_list_workstation_configs - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse.new - http_response = OpenStruct.new 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_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_workstation_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workstation_configs_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.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_workstation_configs_client_stub.call_count - end - end - end - - def test_list_usable_workstation_configs - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse.new - http_response = OpenStruct.new 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_usable_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_usable_workstation_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_usable_workstation_configs_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_usable_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_usable_workstation_configs ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_usable_workstation_configs(::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.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_usable_workstation_configs_client_stub.call_count - end - end - end - - def test_create_workstation_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workstation_config_id = "hello world" - workstation_config = {} - validate_only = true - - create_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workstation_config parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workstation_config ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workstation_config(::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workstation_config_client_stub.call_count - end - end - end - - def test_update_workstation_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workstation_config = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workstation_config workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workstation_config ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workstation_config(::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workstation_config_client_stub.call_count - end - end - end - - def test_delete_workstation_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - force = true - - delete_workstation_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::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workstation_config name: name, validate_only: validate_only, etag: etag, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workstation_config ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workstation_config(::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workstation_config_client_stub.call_count - end - end - end - - def test_get_workstation - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1::Workstation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workstation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workstation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workstation ::Google::Cloud::Workstations::V1::GetWorkstationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workstation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workstation(::Google::Cloud::Workstations::V1::GetWorkstationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workstation_client_stub.call_count - end - end - end - - def test_list_workstations - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1::ListWorkstationsResponse.new - http_response = OpenStruct.new 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_workstations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_workstations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workstations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workstations parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.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_workstations_client_stub.call_count - end - end - end - - def test_list_usable_workstations - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse.new - http_response = OpenStruct.new 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_usable_workstations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_list_usable_workstations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_usable_workstations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_usable_workstations parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_usable_workstations ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_usable_workstations(::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.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_usable_workstations_client_stub.call_count - end - end - end - - def test_create_workstation - # Create test objects. - 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" - workstation_id = "hello world" - workstation = {} - validate_only = true - - create_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workstation parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workstation ::Google::Cloud::Workstations::V1::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workstation(::Google::Cloud::Workstations::V1::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workstation_client_stub.call_count - end - end - end - - def test_update_workstation - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workstation = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workstation({ workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workstation workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workstation ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workstation({ workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workstation(::Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workstation_client_stub.call_count - end - end - end - - def test_delete_workstation - # Create test objects. - 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" - validate_only = true - etag = "hello world" - - delete_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workstation ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workstation(::Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workstation_client_stub.call_count - end - end - end - - def test_start_workstation - # Create test objects. - 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" - validate_only = true - etag = "hello world" - - start_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_start_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_workstation_client_stub.call_count - end - end - end - - def test_stop_workstation - # Create test objects. - 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" - validate_only = true - etag = "hello world" - - stop_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_stop_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, stop_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.stop_workstation ::Google::Cloud::Workstations::V1::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.stop_workstation(::Google::Cloud::Workstations::V1::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, stop_workstation_client_stub.call_count - end - end - end - - def test_generate_access_token - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - expire_time = {} - workstation = "hello world" - - generate_access_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1::Workstations::Rest::ServiceStub.stub :transcode_generate_access_token_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_access_token_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_access_token({ expire_time: expire_time, workstation: workstation }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_access_token expire_time: expire_time, workstation: workstation do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_access_token({ expire_time: expire_time, workstation: workstation }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_access_token_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::Workstations::V1::Workstations::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::Workstations::V1::Workstations::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb b/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb deleted file mode 100644 index 18791d244c13..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/google/cloud/workstations/v1/workstations_test.rb +++ /dev/null @@ -1,1441 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workstations/v1/workstations_pb" -require "google/cloud/workstations/v1/workstations" - -class ::Google::Cloud::Workstations::V1::Workstations::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_workstation_cluster - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1::WorkstationCluster.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workstation_cluster, name - assert_kind_of ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workstation_cluster({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workstation_cluster name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workstation_cluster ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workstation_cluster({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workstation_cluster(::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workstation_cluster_client_stub.call_rpc_count - end - end - - def test_list_workstation_clusters - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1::ListWorkstationClustersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstation_clusters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workstation_clusters, name - assert_kind_of ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest, 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_workstation_clusters_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workstation_clusters ::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workstation_clusters(::Google::Cloud::Workstations::V1::ListWorkstationClustersRequest.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_workstation_clusters_client_stub.call_rpc_count - end - end - - def test_create_workstation_cluster - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workstation_cluster_id = "hello world" - workstation_cluster = {} - validate_only = true - - create_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workstation_cluster, name - assert_kind_of ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["workstation_cluster_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::WorkstationCluster), request["workstation_cluster"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workstation_cluster parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workstation_cluster ::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workstation_cluster(::Google::Cloud::Workstations::V1::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, 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_workstation_cluster_client_stub.call_rpc_count - end - end - - def test_update_workstation_cluster - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workstation_cluster = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workstation_cluster, name - assert_kind_of ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::WorkstationCluster), request["workstation_cluster"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, 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 - client.update_workstation_cluster workstation_cluster: workstation_cluster, update_mask: update_mask, 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 - client.update_workstation_cluster ::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, 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 - client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, 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 - client.update_workstation_cluster(::Google::Cloud::Workstations::V1::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, 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_workstation_cluster_client_stub.call_rpc_count - end - end - - def test_delete_workstation_cluster - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - force = true - - delete_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workstation_cluster, name - assert_kind_of ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workstation_cluster name: name, validate_only: validate_only, etag: etag, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workstation_cluster ::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workstation_cluster(::Google::Cloud::Workstations::V1::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, 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_workstation_cluster_client_stub.call_rpc_count - end - end - - def test_get_workstation_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1::WorkstationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workstation_config, name - assert_kind_of ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workstation_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workstation_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workstation_config ::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workstation_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workstation_config(::Google::Cloud::Workstations::V1::GetWorkstationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workstation_config_client_stub.call_rpc_count - end - end - - def test_list_workstation_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1::ListWorkstationConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstation_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workstation_configs, name - assert_kind_of ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest, 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_workstation_configs_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workstation_configs ::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workstation_configs(::Google::Cloud::Workstations::V1::ListWorkstationConfigsRequest.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_workstation_configs_client_stub.call_rpc_count - end - end - - def test_list_usable_workstation_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_usable_workstation_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_usable_workstation_configs, name - assert_kind_of ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest, 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_usable_workstation_configs_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_usable_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_usable_workstation_configs ::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_usable_workstation_configs(::Google::Cloud::Workstations::V1::ListUsableWorkstationConfigsRequest.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_usable_workstation_configs_client_stub.call_rpc_count - end - end - - def test_create_workstation_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workstation_config_id = "hello world" - workstation_config = {} - validate_only = true - - create_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workstation_config, name - assert_kind_of ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["workstation_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::WorkstationConfig), request["workstation_config"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workstation_config parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workstation_config ::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workstation_config(::Google::Cloud::Workstations::V1::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_workstation_config_client_stub.call_rpc_count - end - end - - def test_update_workstation_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workstation_config = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workstation_config, name - assert_kind_of ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::WorkstationConfig), request["workstation_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, 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 - client.update_workstation_config workstation_config: workstation_config, update_mask: update_mask, 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 - client.update_workstation_config ::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, 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 - client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, 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 - client.update_workstation_config(::Google::Cloud::Workstations::V1::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, 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_workstation_config_client_stub.call_rpc_count - end - end - - def test_delete_workstation_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - force = true - - delete_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workstation_config, name - assert_kind_of ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workstation_config name: name, validate_only: validate_only, etag: etag, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workstation_config ::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workstation_config(::Google::Cloud::Workstations::V1::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, 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_workstation_config_client_stub.call_rpc_count - end - end - - def test_get_workstation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1::Workstation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1::GetWorkstationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workstation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workstation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workstation ::Google::Cloud::Workstations::V1::GetWorkstationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workstation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workstation(::Google::Cloud::Workstations::V1::GetWorkstationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workstation_client_stub.call_rpc_count - end - end - - def test_list_workstations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1::ListWorkstationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workstations, name - assert_kind_of ::Google::Cloud::Workstations::V1::ListWorkstationsRequest, 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_workstations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workstations parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workstations ::Google::Cloud::Workstations::V1::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workstations(::Google::Cloud::Workstations::V1::ListWorkstationsRequest.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_workstations_client_stub.call_rpc_count - end - end - - def test_list_usable_workstations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1::ListUsableWorkstationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_usable_workstations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_usable_workstations, name - assert_kind_of ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest, 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_usable_workstations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_usable_workstations parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_usable_workstations ::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_usable_workstations(::Google::Cloud::Workstations::V1::ListUsableWorkstationsRequest.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_usable_workstations_client_stub.call_rpc_count - end - end - - def test_create_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workstation_id = "hello world" - workstation = {} - validate_only = true - - create_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1::CreateWorkstationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["workstation_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::Workstation), request["workstation"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workstation parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workstation ::Google::Cloud::Workstations::V1::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workstation(::Google::Cloud::Workstations::V1::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, 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_workstation_client_stub.call_rpc_count - end - end - - def test_update_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workstation = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1::Workstation), request["workstation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workstation({ workstation: workstation, update_mask: update_mask, 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 - client.update_workstation workstation: workstation, update_mask: update_mask, 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 - client.update_workstation ::Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, 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 - client.update_workstation({ workstation: workstation, update_mask: update_mask, 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 - client.update_workstation(::Google::Cloud::Workstations::V1::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, 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_workstation_client_stub.call_rpc_count - end - end - - def test_delete_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - - delete_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workstation ::Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workstation(::Google::Cloud::Workstations::V1::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_workstation_client_stub.call_rpc_count - end - end - - def test_start_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - - start_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1::StartWorkstationRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_workstation ::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_workstation(::Google::Cloud::Workstations::V1::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, start_workstation_client_stub.call_rpc_count - end - end - - def test_stop_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - - stop_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :stop_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1::StopWorkstationRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, stop_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.stop_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.stop_workstation ::Google::Cloud::Workstations::V1::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.stop_workstation(::Google::Cloud::Workstations::V1::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, stop_workstation_client_stub.call_rpc_count - end - end - - def test_generate_access_token - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1::GenerateAccessTokenResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - expire_time = {} - workstation = "hello world" - - generate_access_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_access_token, name - assert_kind_of ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["expire_time"] - assert_equal :expire_time, request.expiration - assert_equal "hello world", request["workstation"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_access_token_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_access_token({ expire_time: expire_time, workstation: workstation }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_access_token expire_time: expire_time, workstation: workstation do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_access_token ::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_access_token({ expire_time: expire_time, workstation: workstation }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_access_token(::Google::Cloud::Workstations::V1::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_access_token_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::Workstations::V1::Workstations::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::Workstations::V1::Workstations::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::Workstations::V1::Workstations::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Workstations::V1::Workstations::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::Workstations::V1::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Workstations::V1::Workstations::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1/test/helper.rb b/owl-bot-staging/google-cloud-workstations-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore b/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.repo-metadata.json b/owl-bot-staging/google-cloud-workstations-v1beta/.repo-metadata.json deleted file mode 100644 index 1f075089291e..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "workstations.googleapis.com", - "api_shortname": "workstations", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest", - "distribution_name": "google-cloud-workstations-v1beta", - "is_cloud": true, - "language": "ruby", - "name": "workstations", - "name_pretty": "Cloud Workstations V1BETA API", - "product_documentation": "https://cloud.google.com/workstations/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Allows administrators to create managed developer environments in the cloud. Note that google-cloud-workstations-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workstations instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/workstations/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.rubocop.yml b/owl-bot-staging/google-cloud-workstations-v1beta/.rubocop.yml deleted file mode 100644 index 7ef831857790..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workstations-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-workstations-v1beta.rb" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/.toys.rb b/owl-bot-staging/google-cloud-workstations-v1beta/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/.yardopts b/owl-bot-staging/google-cloud-workstations-v1beta/.yardopts deleted file mode 100644 index 760a9a0f14a5..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Workstations 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-workstations-v1beta/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workstations-v1beta/AUTHENTICATION.md deleted file mode 100644 index 31c9da61967d..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workstations-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-workstations-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/workstations/v1beta" - -client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workstations/v1beta" - -::Google::Cloud::Workstations::V1beta::Workstations::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Workstations::V1beta::Workstations::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-workstations-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/workstations/v1beta" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Workstations::V1beta::Workstations::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-workstations-v1beta/CHANGELOG.md b/owl-bot-staging/google-cloud-workstations-v1beta/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/Gemfile b/owl-bot-staging/google-cloud-workstations-v1beta/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/LICENSE.md b/owl-bot-staging/google-cloud-workstations-v1beta/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/README.md b/owl-bot-staging/google-cloud-workstations-v1beta/README.md deleted file mode 100644 index 97a3e0b962f0..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/README.md +++ /dev/null @@ -1,153 +0,0 @@ -# Ruby Client for the Cloud Workstations V1BETA API - -Allows administrators to create managed developer environments in the 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 Cloud Workstations V1BETA API. Most users should consider using -the main client gem, -[google-cloud-workstations](https://rubygems.org/gems/google-cloud-workstations). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-workstations-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/workstations.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/workstations/v1beta" - -client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new -request = ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new # (request fields as keyword arguments...) -response = client.get_workstation_cluster request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1beta/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/workstations/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/workstations/v1beta" -require "logger" - -client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workstations`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workstations-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-workstations`. -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-workstations-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-workstations-v1beta/Rakefile b/owl-bot-staging/google-cloud-workstations-v1beta/Rakefile deleted file mode 100644 index 19a6e40ad1cb..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-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/workstations/v1beta/workstations/credentials" - ::Google::Cloud::Workstations::V1beta::Workstations::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-workstations-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-workstations-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-workstations-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-workstations-v1beta gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workstations-v1beta" - header "google-cloud-workstations-v1beta rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workstations-v1beta yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workstations-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-workstations-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-workstations-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-workstations-v1beta/gapic_metadata.json b/owl-bot-staging/google-cloud-workstations-v1beta/gapic_metadata.json deleted file mode 100644 index f14a54eb9f14..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/gapic_metadata.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.workstations.v1beta", - "libraryPackage": "::Google::Cloud::Workstations::V1beta", - "services": { - "Workstations": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Workstations::V1beta::Workstations::Client", - "rpcs": { - "GetWorkstationCluster": { - "methods": [ - "get_workstation_cluster" - ] - }, - "ListWorkstationClusters": { - "methods": [ - "list_workstation_clusters" - ] - }, - "CreateWorkstationCluster": { - "methods": [ - "create_workstation_cluster" - ] - }, - "UpdateWorkstationCluster": { - "methods": [ - "update_workstation_cluster" - ] - }, - "DeleteWorkstationCluster": { - "methods": [ - "delete_workstation_cluster" - ] - }, - "GetWorkstationConfig": { - "methods": [ - "get_workstation_config" - ] - }, - "ListWorkstationConfigs": { - "methods": [ - "list_workstation_configs" - ] - }, - "ListUsableWorkstationConfigs": { - "methods": [ - "list_usable_workstation_configs" - ] - }, - "CreateWorkstationConfig": { - "methods": [ - "create_workstation_config" - ] - }, - "UpdateWorkstationConfig": { - "methods": [ - "update_workstation_config" - ] - }, - "DeleteWorkstationConfig": { - "methods": [ - "delete_workstation_config" - ] - }, - "GetWorkstation": { - "methods": [ - "get_workstation" - ] - }, - "ListWorkstations": { - "methods": [ - "list_workstations" - ] - }, - "ListUsableWorkstations": { - "methods": [ - "list_usable_workstations" - ] - }, - "CreateWorkstation": { - "methods": [ - "create_workstation" - ] - }, - "UpdateWorkstation": { - "methods": [ - "update_workstation" - ] - }, - "DeleteWorkstation": { - "methods": [ - "delete_workstation" - ] - }, - "StartWorkstation": { - "methods": [ - "start_workstation" - ] - }, - "StopWorkstation": { - "methods": [ - "stop_workstation" - ] - }, - "GenerateAccessToken": { - "methods": [ - "generate_access_token" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/google-cloud-workstations-v1beta.gemspec b/owl-bot-staging/google-cloud-workstations-v1beta/google-cloud-workstations-v1beta.gemspec deleted file mode 100644 index ba0788c51019..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/google-cloud-workstations-v1beta.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workstations/v1beta/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workstations-v1beta" - gem.version = Google::Cloud::Workstations::V1beta::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Allows administrators to create managed developer environments in the cloud. Note that google-cloud-workstations-v1beta is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-workstations instead. See the readme for more details." - gem.summary = "Allows administrators to create managed developer environments in the cloud." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" - gem.add_dependency "google-iam-v1", "~> 1.3" -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google-cloud-workstations-v1beta.rb deleted file mode 100644 index a0188c280162..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google-cloud-workstations-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/workstations/v1beta" diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta.rb deleted file mode 100644 index c7ef63fc2912..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/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/workstations/v1beta/workstations" -require "google/cloud/workstations/v1beta/version" - -module Google - module Cloud - module Workstations - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/workstations/v1beta" - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/workstations/v1beta" - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - module V1beta - end - end - end -end - -helper_path = ::File.join __dir__, "v1beta", "_helpers.rb" -require "google/cloud/workstations/v1beta/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb deleted file mode 100644 index 2b52965b4f26..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/bindings_override.rb +++ /dev/null @@ -1,110 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/rest" - -module Google - module Cloud - module Workstations - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/workstations/v1beta/rest" - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - module V1beta - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workstations"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - - default_config = ::Gapic::Rest::HttpBindingOverrideConfiguration.new parent_config - default_config.bindings_override["google.iam.v1.IAMPolicy.GetIamPolicy"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1beta/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1beta/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1beta/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1beta/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1beta/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/rest.rb deleted file mode 100644 index 80bc9428e548..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/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/workstations/v1beta/workstations/rest" -require "google/cloud/workstations/v1beta/bindings_override" -require "google/cloud/workstations/v1beta/version" - -module Google - module Cloud - module Workstations - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/workstations/v1beta/rest" - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - module V1beta - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/version.rb deleted file mode 100644 index 4f71d3f1ee75..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/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 Workstations - module V1beta - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.rb deleted file mode 100644 index b0c7dfb12bbf..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations.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/workstations/v1beta/version" - -require "google/cloud/workstations/v1beta/workstations/credentials" -require "google/cloud/workstations/v1beta/workstations/paths" -require "google/cloud/workstations/v1beta/workstations/operations" -require "google/cloud/workstations/v1beta/workstations/client" -require "google/cloud/workstations/v1beta/workstations/rest" - -module Google - module Cloud - module Workstations - module V1beta - ## - # Service for interacting with Cloud Workstations. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/workstations/v1beta/workstations" - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/workstations/v1beta/workstations/rest" - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - module Workstations - end - end - end - end -end - -helper_path = ::File.join __dir__, "workstations", "helpers.rb" -require "google/cloud/workstations/v1beta/workstations/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb deleted file mode 100644 index 0921d9287c0a..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/client.rb +++ /dev/null @@ -1,2595 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/workstations/v1beta/workstations_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Workstations - module V1beta - module Workstations - ## - # Client for the Workstations service. - # - # Service for interacting with Cloud Workstations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workstations_stub - - ## - # Configure the Workstations Client class. - # - # See {::Google::Cloud::Workstations::V1beta::Workstations::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Workstations clients - # ::Google::Cloud::Workstations::V1beta::Workstations::Client.configure do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Workstations", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_workstation_cluster.timeout = 60.0 - default_config.rpcs.get_workstation_cluster.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstation_clusters.timeout = 60.0 - default_config.rpcs.list_workstation_clusters.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation_cluster.timeout = 60.0 - - default_config.rpcs.update_workstation_cluster.timeout = 60.0 - - default_config.rpcs.delete_workstation_cluster.timeout = 60.0 - - default_config.rpcs.get_workstation_config.timeout = 60.0 - default_config.rpcs.get_workstation_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstation_configs.timeout = 60.0 - default_config.rpcs.list_workstation_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_usable_workstation_configs.timeout = 60.0 - default_config.rpcs.list_usable_workstation_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation_config.timeout = 60.0 - - default_config.rpcs.update_workstation_config.timeout = 60.0 - - default_config.rpcs.delete_workstation_config.timeout = 60.0 - - default_config.rpcs.get_workstation.timeout = 60.0 - default_config.rpcs.get_workstation.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstations.timeout = 60.0 - default_config.rpcs.list_workstations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_usable_workstations.timeout = 60.0 - default_config.rpcs.list_usable_workstations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation.timeout = 60.0 - - default_config.rpcs.update_workstation.timeout = 60.0 - - default_config.rpcs.delete_workstation.timeout = 60.0 - - default_config.rpcs.start_workstation.timeout = 60.0 - - default_config.rpcs.stop_workstation.timeout = 60.0 - - default_config.rpcs.generate_access_token.timeout = 60.0 - default_config.rpcs.generate_access_token.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 Workstations Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workstations::V1beta::Workstations::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam config [Client::Configuration] - # - # @return [Client::Configuration] - # - def configure - yield @config if block_given? - @config - end - - ## - # The effective universe domain - # - # @return [String] - # - def universe_domain - @workstations_stub.universe_domain - end - - ## - # Create a new Workstations client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Workstations 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/workstations/v1beta/workstations_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 - - @workstations_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Workstations::V1beta::Workstations::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 - ) - - @workstations_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 = @workstations_stub.endpoint - config.universe_domain = @workstations_stub.universe_domain - config.logger = @workstations_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 = @workstations_stub.endpoint - config.universe_domain = @workstations_stub.universe_domain - config.logger = @workstations_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Workstations::V1beta::Workstations::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 - @workstations_stub.logger - end - - # Service calls - - ## - # Returns the requested workstation cluster. - # - # @overload get_workstation_cluster(request, options = nil) - # Pass arguments to `get_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workstation_cluster(name: nil) - # Pass arguments to `get_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workstations::V1beta::WorkstationCluster] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new - # - # # Call the get_workstation_cluster method. - # result = client.get_workstation_cluster request - # - # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationCluster. - # p result - # - def get_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :get_workstation_cluster, request, 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 all workstation clusters in the specified location. - # - # @overload list_workstation_clusters(request, options = nil) - # Pass arguments to `list_workstation_clusters` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workstation_clusters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstation_clusters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::WorkstationCluster>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationCluster>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new - # - # # Call the list_workstation_clusters method. - # result = client.list_workstation_clusters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1beta::WorkstationCluster. - # p item - # end - # - def list_workstation_clusters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workstation_clusters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation_clusters.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workstation_clusters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_workstation_clusters, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_clusters, request, response, 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 workstation cluster. - # - # @overload create_workstation_cluster(request, options = nil) - # Pass arguments to `create_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) - # Pass arguments to `create_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param workstation_cluster_id [::String] - # Required. ID to use for the workstation cluster. - # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash] - # Required. Workstation cluster to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new - # - # # Call the create_workstation_cluster method. - # result = client.create_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :create_workstation_cluster, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 workstation cluster. - # - # @overload update_workstation_cluster(request, options = nil) - # Pass arguments to `update_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash] - # Required. Workstation cluster to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask that specifies which fields in the workstation cluster - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set, and the workstation cluster is not found, a new - # workstation cluster will be created. In this situation, update_mask is - # ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new - # - # # Call the update_workstation_cluster method. - # result = client.update_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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.workstation_cluster&.name - header_params["workstation_cluster.name"] = request.workstation_cluster.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_workstation_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :update_workstation_cluster, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified workstation cluster. - # - # @overload delete_workstation_cluster(request, options = nil) - # Pass arguments to `delete_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation cluster to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation cluster on the server does not have this ETag. - # @param force [::Boolean] - # Optional. If set, any workstation configurations and workstations in the - # workstation cluster are also deleted. Otherwise, the request only - # works if the workstation cluster has no configurations or workstations. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new - # - # # Call the delete_workstation_cluster method. - # result = client.delete_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :delete_workstation_cluster, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested workstation configuration. - # - # @overload get_workstation_config(request, options = nil) - # Pass arguments to `get_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workstation_config(name: nil) - # Pass arguments to `get_workstation_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 requested resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workstations::V1beta::WorkstationConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new - # - # # Call the get_workstation_config method. - # result = client.get_workstation_config request - # - # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationConfig. - # p result - # - def get_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workstation_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::Workstations::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_workstation_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :get_workstation_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 all workstation configurations in the specified cluster. - # - # @overload list_workstation_configs(request, options = nil) - # Pass arguments to `list_workstation_configs` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workstation_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstation_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. Parent resource name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::WorkstationConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new - # - # # Call the list_workstation_configs method. - # result = client.list_workstation_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::Workstations::V1beta::WorkstationConfig. - # p item - # end - # - def list_workstation_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workstation_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::Workstations::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_workstation_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workstation_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_workstation_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstation_configs, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all workstation configurations in the specified cluster on which - # the caller has the "workstations.workstation.create" permission. - # - # @overload list_usable_workstation_configs(request, options = nil) - # Pass arguments to `list_usable_workstation_configs` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_usable_workstation_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. Parent resource name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::WorkstationConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new - # - # # Call the list_usable_workstation_configs method. - # result = client.list_usable_workstation_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::Workstations::V1beta::WorkstationConfig. - # p item - # end - # - def list_usable_workstation_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_usable_workstation_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::Workstations::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_usable_workstation_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_usable_workstation_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_usable_workstation_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstation_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 a new workstation configuration. - # - # @overload create_workstation_config(request, options = nil) - # Pass arguments to `create_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) - # Pass arguments to `create_workstation_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. Parent resource name. - # @param workstation_config_id [::String] - # Required. ID to use for the workstation configuration. - # @param workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash] - # Required. Config to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new - # - # # Call the create_workstation_config method. - # result = client.create_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workstation_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::Workstations::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_workstation_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :create_workstation_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workstation configuration. - # - # @overload update_workstation_config(request, options = nil) - # Pass arguments to `update_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation_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 workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash] - # Required. Config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration will be created. In this situation, - # update_mask is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new - # - # # Call the update_workstation_config method. - # result = client.update_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workstation_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::Workstations::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.workstation_config&.name - header_params["workstation_config.name"] = request.workstation_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_workstation_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :update_workstation_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified workstation configuration. - # - # @overload delete_workstation_config(request, options = nil) - # Pass arguments to `delete_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_workstation_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 workstation configuration to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request is rejected if the latest version of the - # workstation configuration on the server does not have this ETag. - # @param force [::Boolean] - # Optional. If set, any workstations in the workstation configuration are - # also deleted. Otherwise, the request works only if the workstation - # configuration has no workstations. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new - # - # # Call the delete_workstation_config method. - # result = client.delete_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workstation_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::Workstations::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_workstation_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :delete_workstation_config, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested workstation. - # - # @overload get_workstation(request, options = nil) - # Pass arguments to `get_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::GetWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_workstation(name: nil) - # Pass arguments to `get_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workstations::V1beta::Workstation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workstations::V1beta::Workstation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new - # - # # Call the get_workstation method. - # result = client.get_workstation request - # - # # The returned object is of type Google::Cloud::Workstations::V1beta::Workstation. - # p result - # - def get_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.get_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :get_workstation, request, 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 all Workstations using the specified workstation configuration. - # - # @overload list_workstations(request, options = nil) - # Pass arguments to `list_workstations` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_workstations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::Workstation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new - # - # # Call the list_workstations method. - # result = client.list_workstations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. - # p item - # end - # - def list_workstations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_workstations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_workstations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_workstations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_workstations, request, response, 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 all workstations using the specified workstation configuration - # on which the caller has the "workstations.workstations.use" permission. - # - # @overload list_usable_workstations(request, options = nil) - # Pass arguments to `list_usable_workstations` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_usable_workstations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_usable_workstations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::Workstation>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new - # - # # Call the list_usable_workstations method. - # result = client.list_usable_workstations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. - # p item - # end - # - def list_usable_workstations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.list_usable_workstations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_usable_workstations.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_usable_workstations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :list_usable_workstations, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @workstations_stub, :list_usable_workstations, request, response, 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 workstation. - # - # @overload create_workstation(request, options = nil) - # Pass arguments to `create_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) - # Pass arguments to `create_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param workstation_id [::String] - # Required. ID to use for the workstation. - # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash] - # Required. Workstation to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new - # - # # Call the create_workstation method. - # result = client.create_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.create_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :create_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 workstation. - # - # @overload update_workstation(request, options = nil) - # Pass arguments to `update_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash] - # Required. Workstation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration is created. In this situation, update_mask - # is ignored. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new - # - # # Call the update_workstation method. - # result = client.update_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.update_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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.workstation&.name - header_params["workstation.name"] = request.workstation.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.update_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :update_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified workstation. - # - # @overload delete_workstation(request, options = nil) - # Pass arguments to `delete_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new - # - # # Call the delete_workstation method. - # result = client.delete_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.delete_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :delete_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, 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 running a workstation so that users can connect to it. - # - # @overload start_workstation(request, options = nil) - # Pass arguments to `start_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::StartWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::StartWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `start_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to start. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new - # - # # Call the start_workstation method. - # result = client.start_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest - - # Converts hash and nil to 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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.start_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.start_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :start_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stops running a workstation, reducing costs. - # - # @overload stop_workstation(request, options = nil) - # Pass arguments to `stop_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::StopWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::StopWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `stop_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to stop. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::Operation] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new - # - # # Call the stop_workstation method. - # result = client.stop_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest - - # Converts hash and nil to 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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.stop_workstation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.stop_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :stop_workstation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a short-lived credential that can be used to send authenticated and - # authorized traffic to a workstation. - # - # @overload generate_access_token(request, options = nil) - # Pass arguments to `generate_access_token` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_token(expire_time: nil, ttl: nil, workstation: nil) - # Pass arguments to `generate_access_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] - # Desired expiration time of the access token. This value must - # be at most 24 hours in the future. If a value is not specified, the - # token's expiration time will be set to a default value of 1 hour in the - # future. - # - # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. 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 ttl [::Google::Protobuf::Duration, ::Hash] - # Desired lifetime duration of the access token. This value must - # be at most 24 hours. If a value is not specified, the token's lifetime - # will be set to a default value of 1 hour. - # - # Note: The following parameters are mutually exclusive: `ttl`, `expire_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 workstation [::String] - # Required. Name of the workstation for which the access token should be - # generated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new - # - # # Call the generate_access_token method. - # result = client.generate_access_token request - # - # # The returned object is of type Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse. - # p result - # - def generate_access_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest - - # Converts hash and nil to 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_access_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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.workstation - header_params["workstation"] = request.workstation - end - - request_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_access_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_access_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.call_rpc :generate_access_token, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Workstations API. - # - # This class represents the configuration for Workstations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Cloud::Workstations::V1beta::Workstations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # 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_workstation_cluster to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workstations::V1beta::Workstations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_workstation_cluster.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_workstation_cluster.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Workstations::V1beta::Workstations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workstations.googleapis.com" - - config_attr :endpoint, nil, ::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 Workstations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation_cluster - ## - # RPC-specific configuration for `list_workstation_clusters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstation_clusters - ## - # RPC-specific configuration for `create_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation_cluster - ## - # RPC-specific configuration for `update_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation_cluster - ## - # RPC-specific configuration for `delete_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation_cluster - ## - # RPC-specific configuration for `get_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation_config - ## - # RPC-specific configuration for `list_workstation_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstation_configs - ## - # RPC-specific configuration for `list_usable_workstation_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_usable_workstation_configs - ## - # RPC-specific configuration for `create_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation_config - ## - # RPC-specific configuration for `update_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation_config - ## - # RPC-specific configuration for `delete_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation_config - ## - # RPC-specific configuration for `get_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation - ## - # RPC-specific configuration for `list_workstations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstations - ## - # RPC-specific configuration for `list_usable_workstations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_usable_workstations - ## - # RPC-specific configuration for `create_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation - ## - # RPC-specific configuration for `update_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation - ## - # RPC-specific configuration for `delete_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation - ## - # RPC-specific configuration for `start_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :start_workstation - ## - # RPC-specific configuration for `stop_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_workstation - ## - # RPC-specific configuration for `generate_access_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_access_token - - # @private - def initialize parent_rpcs = nil - get_workstation_cluster_config = parent_rpcs.get_workstation_cluster if parent_rpcs.respond_to? :get_workstation_cluster - @get_workstation_cluster = ::Gapic::Config::Method.new get_workstation_cluster_config - list_workstation_clusters_config = parent_rpcs.list_workstation_clusters if parent_rpcs.respond_to? :list_workstation_clusters - @list_workstation_clusters = ::Gapic::Config::Method.new list_workstation_clusters_config - create_workstation_cluster_config = parent_rpcs.create_workstation_cluster if parent_rpcs.respond_to? :create_workstation_cluster - @create_workstation_cluster = ::Gapic::Config::Method.new create_workstation_cluster_config - update_workstation_cluster_config = parent_rpcs.update_workstation_cluster if parent_rpcs.respond_to? :update_workstation_cluster - @update_workstation_cluster = ::Gapic::Config::Method.new update_workstation_cluster_config - delete_workstation_cluster_config = parent_rpcs.delete_workstation_cluster if parent_rpcs.respond_to? :delete_workstation_cluster - @delete_workstation_cluster = ::Gapic::Config::Method.new delete_workstation_cluster_config - get_workstation_config_config = parent_rpcs.get_workstation_config if parent_rpcs.respond_to? :get_workstation_config - @get_workstation_config = ::Gapic::Config::Method.new get_workstation_config_config - list_workstation_configs_config = parent_rpcs.list_workstation_configs if parent_rpcs.respond_to? :list_workstation_configs - @list_workstation_configs = ::Gapic::Config::Method.new list_workstation_configs_config - list_usable_workstation_configs_config = parent_rpcs.list_usable_workstation_configs if parent_rpcs.respond_to? :list_usable_workstation_configs - @list_usable_workstation_configs = ::Gapic::Config::Method.new list_usable_workstation_configs_config - create_workstation_config_config = parent_rpcs.create_workstation_config if parent_rpcs.respond_to? :create_workstation_config - @create_workstation_config = ::Gapic::Config::Method.new create_workstation_config_config - update_workstation_config_config = parent_rpcs.update_workstation_config if parent_rpcs.respond_to? :update_workstation_config - @update_workstation_config = ::Gapic::Config::Method.new update_workstation_config_config - delete_workstation_config_config = parent_rpcs.delete_workstation_config if parent_rpcs.respond_to? :delete_workstation_config - @delete_workstation_config = ::Gapic::Config::Method.new delete_workstation_config_config - get_workstation_config = parent_rpcs.get_workstation if parent_rpcs.respond_to? :get_workstation - @get_workstation = ::Gapic::Config::Method.new get_workstation_config - list_workstations_config = parent_rpcs.list_workstations if parent_rpcs.respond_to? :list_workstations - @list_workstations = ::Gapic::Config::Method.new list_workstations_config - list_usable_workstations_config = parent_rpcs.list_usable_workstations if parent_rpcs.respond_to? :list_usable_workstations - @list_usable_workstations = ::Gapic::Config::Method.new list_usable_workstations_config - create_workstation_config = parent_rpcs.create_workstation if parent_rpcs.respond_to? :create_workstation - @create_workstation = ::Gapic::Config::Method.new create_workstation_config - update_workstation_config = parent_rpcs.update_workstation if parent_rpcs.respond_to? :update_workstation - @update_workstation = ::Gapic::Config::Method.new update_workstation_config - delete_workstation_config = parent_rpcs.delete_workstation if parent_rpcs.respond_to? :delete_workstation - @delete_workstation = ::Gapic::Config::Method.new delete_workstation_config - start_workstation_config = parent_rpcs.start_workstation if parent_rpcs.respond_to? :start_workstation - @start_workstation = ::Gapic::Config::Method.new start_workstation_config - stop_workstation_config = parent_rpcs.stop_workstation if parent_rpcs.respond_to? :stop_workstation - @stop_workstation = ::Gapic::Config::Method.new stop_workstation_config - generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token - @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/credentials.rb deleted file mode 100644 index cd1d778b15ef..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/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 Workstations - module V1beta - module Workstations - # Credentials for the Workstations 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-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb deleted file mode 100644 index 59dfe3cc08d6..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/operations.rb +++ /dev/null @@ -1,841 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" -require "google/longrunning/operations_pb" - -module Google - module Cloud - module Workstations - module V1beta - module Workstations - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Workstations 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 Workstations 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::Workstations::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::Workstations::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::Workstations::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::Workstations::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::Workstations::V1beta::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.wait_operation.timeout, - metadata: metadata, - retry_policy: @config.rpcs.wait_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.call_rpc :wait_operation, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations API. - # - # This class represents the configuration for Operations, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`GRPC::Core::Channel`) a gRPC channel with included credentials - # * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object - # * (`nil`) indicating no credentials - # - # @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials - # is deprecated. Providing an unvalidated credential configuration to - # Google APIs can compromise the security of your systems and data. - # - # @example - # - # # The recommended way to provide credentials is to use the `make_creds` method - # # on the appropriate credentials class for your environment. - # - # require "googleauth" - # - # credentials = ::Google::Auth::ServiceAccountCredentials.make_creds( - # json_key_io: ::File.open("/path/to/keyfile.json") - # ) - # - # client = ::Google::Longrunning::Operations::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workstations.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC::Core::Channel - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil) - config_attr :interceptors, nil, ::Array, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration for the channel pool - # @return [::Gapic::ServiceStub::ChannelPool::Configuration] - # - def channel_pool - @channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - ## - # RPC-specific configuration for `wait_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :wait_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - wait_operation_config = parent_rpcs.wait_operation if parent_rpcs.respond_to? :wait_operation - @wait_operation = ::Gapic::Config::Method.new wait_operation_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/paths.rb deleted file mode 100644 index 651fbc0e8140..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/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 Workstations - module V1beta - module Workstations - # Path helper methods for the Workstations 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 Workstation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}` - # - # @param project [String] - # @param location [String] - # @param workstation_cluster [String] - # @param workstation_config [String] - # @param workstation [String] - # - # @return [::String] - def workstation_path project:, location:, workstation_cluster:, workstation_config:, workstation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "workstation_cluster cannot contain /" if workstation_cluster.to_s.include? "/" - raise ::ArgumentError, "workstation_config cannot contain /" if workstation_config.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}/workstations/#{workstation}" - end - - ## - # Create a fully-qualified WorkstationCluster resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}` - # - # @param project [String] - # @param location [String] - # @param workstation_cluster [String] - # - # @return [::String] - def workstation_cluster_path project:, location:, workstation_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}/workstationClusters/#{workstation_cluster}" - end - - ## - # Create a fully-qualified WorkstationConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}` - # - # @param project [String] - # @param location [String] - # @param workstation_cluster [String] - # @param workstation_config [String] - # - # @return [::String] - def workstation_config_path project:, location:, workstation_cluster:, workstation_config: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "workstation_cluster cannot contain /" if workstation_cluster.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workstationClusters/#{workstation_cluster}/workstationConfigs/#{workstation_config}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest.rb deleted file mode 100644 index 203469f53bee..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/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/workstations/v1beta/version" -require "google/cloud/workstations/v1beta/bindings_override" - -require "google/cloud/workstations/v1beta/workstations/credentials" -require "google/cloud/workstations/v1beta/workstations/paths" -require "google/cloud/workstations/v1beta/workstations/rest/operations" -require "google/cloud/workstations/v1beta/workstations/rest/client" - -module Google - module Cloud - module Workstations - module V1beta - ## - # Service for interacting with Cloud Workstations. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/workstations/v1beta/workstations/rest" - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - module Workstations - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/workstations/v1beta/workstations/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb deleted file mode 100644 index 914cc70a57bb..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/client.rb +++ /dev/null @@ -1,2420 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/workstations/v1beta/workstations_pb" -require "google/cloud/workstations/v1beta/workstations/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Workstations - module V1beta - module Workstations - module Rest - ## - # REST client for the Workstations service. - # - # Service for interacting with Cloud Workstations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :workstations_stub - - ## - # Configure the Workstations Client class. - # - # See {::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Workstations clients - # ::Google::Cloud::Workstations::V1beta::Workstations::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", "Workstations", "V1beta"] - parent_config = while namespace.any? - parent_name = namespace.join "::" - parent_const = const_get parent_name - break parent_const.configure if parent_const.respond_to? :configure - namespace.pop - end - default_config = Client::Configuration.new parent_config - - default_config.rpcs.get_workstation_cluster.timeout = 60.0 - default_config.rpcs.get_workstation_cluster.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstation_clusters.timeout = 60.0 - default_config.rpcs.list_workstation_clusters.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation_cluster.timeout = 60.0 - - default_config.rpcs.update_workstation_cluster.timeout = 60.0 - - default_config.rpcs.delete_workstation_cluster.timeout = 60.0 - - default_config.rpcs.get_workstation_config.timeout = 60.0 - default_config.rpcs.get_workstation_config.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstation_configs.timeout = 60.0 - default_config.rpcs.list_workstation_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_usable_workstation_configs.timeout = 60.0 - default_config.rpcs.list_usable_workstation_configs.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation_config.timeout = 60.0 - - default_config.rpcs.update_workstation_config.timeout = 60.0 - - default_config.rpcs.delete_workstation_config.timeout = 60.0 - - default_config.rpcs.get_workstation.timeout = 60.0 - default_config.rpcs.get_workstation.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_workstations.timeout = 60.0 - default_config.rpcs.list_workstations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_usable_workstations.timeout = 60.0 - default_config.rpcs.list_usable_workstations.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_workstation.timeout = 60.0 - - default_config.rpcs.update_workstation.timeout = 60.0 - - default_config.rpcs.delete_workstation.timeout = 60.0 - - default_config.rpcs.start_workstation.timeout = 60.0 - - default_config.rpcs.stop_workstation.timeout = 60.0 - - default_config.rpcs.generate_access_token.timeout = 60.0 - default_config.rpcs.generate_access_token.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 Workstations Client instance. - # - # The configuration is set to the derived mode, meaning that values can be changed, - # but structural changes (adding new fields, etc.) are not allowed. Structural changes - # should be made on {Client.configure}. - # - # See {::Google::Cloud::Workstations::V1beta::Workstations::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 - @workstations_stub.universe_domain - end - - ## - # Create a new Workstations REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Workstations 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::Workstations::V1beta::Workstations::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 - - @workstations_stub = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @workstations_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 = @workstations_stub.endpoint - config.universe_domain = @workstations_stub.universe_domain - config.logger = @workstations_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 = @workstations_stub.endpoint - config.universe_domain = @workstations_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @workstations_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Workstations::V1beta::Workstations::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 - @workstations_stub.logger - end - - # Service calls - - ## - # Returns the requested workstation cluster. - # - # @overload get_workstation_cluster(request, options = nil) - # Pass arguments to `get_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workstation_cluster(name: nil) - # Pass arguments to `get_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::WorkstationCluster] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new - # - # # Call the get_workstation_cluster method. - # result = client.get_workstation_cluster request - # - # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationCluster. - # p result - # - def get_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.get_workstation_cluster request, 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 all workstation clusters in the specified location. - # - # @overload list_workstation_clusters(request, options = nil) - # Pass arguments to `list_workstation_clusters` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workstation_clusters(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstation_clusters` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::WorkstationCluster>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationCluster>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new - # - # # Call the list_workstation_clusters method. - # result = client.list_workstation_clusters request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1beta::WorkstationCluster. - # p item - # end - # - def list_workstation_clusters request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workstation_clusters.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation_clusters.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workstation_clusters.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_workstation_clusters request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstation_clusters, "workstation_clusters", request, result, 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 workstation cluster. - # - # @overload create_workstation_cluster(request, options = nil) - # Pass arguments to `create_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workstation_cluster(parent: nil, workstation_cluster_id: nil, workstation_cluster: nil, validate_only: nil) - # Pass arguments to `create_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param workstation_cluster_id [::String] - # Required. ID to use for the workstation cluster. - # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash] - # Required. Workstation cluster to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new - # - # # Call the create_workstation_cluster method. - # result = client.create_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest - - # Converts hash and nil to an 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_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.create_workstation_cluster request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation cluster. - # - # @overload update_workstation_cluster(request, options = nil) - # Pass arguments to `update_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workstation_cluster(workstation_cluster: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workstation_cluster [::Google::Cloud::Workstations::V1beta::WorkstationCluster, ::Hash] - # Required. Workstation cluster to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask that specifies which fields in the workstation cluster - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set, and the workstation cluster is not found, a new - # workstation cluster will be created. In this situation, update_mask is - # ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new - # - # # Call the update_workstation_cluster method. - # result = client.update_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workstation_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.update_workstation_cluster request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation cluster. - # - # @overload delete_workstation_cluster(request, options = nil) - # Pass arguments to `delete_workstation_cluster` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workstation_cluster(name: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_workstation_cluster` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation cluster to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation cluster on the server does not have this ETag. - # @param force [::Boolean] - # Optional. If set, any workstation configurations and workstations in the - # workstation cluster are also deleted. Otherwise, the request only - # works if the workstation cluster has no configurations or workstations. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new - # - # # Call the delete_workstation_cluster method. - # result = client.delete_workstation_cluster request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation_cluster request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_workstation_cluster.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation_cluster.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workstation_cluster.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.delete_workstation_cluster request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested workstation configuration. - # - # @overload get_workstation_config(request, options = nil) - # Pass arguments to `get_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workstation_config(name: nil) - # Pass arguments to `get_workstation_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 requested resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::WorkstationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new - # - # # Call the get_workstation_config method. - # result = client.get_workstation_config request - # - # # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationConfig. - # p result - # - def get_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workstation_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::Workstations::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_workstation_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.get_workstation_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 all workstation configurations in the specified cluster. - # - # @overload list_workstation_configs(request, options = nil) - # Pass arguments to `list_workstation_configs` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workstation_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstation_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. Parent resource name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::WorkstationConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new - # - # # Call the list_workstation_configs method. - # result = client.list_workstation_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::Workstations::V1beta::WorkstationConfig. - # p item - # end - # - def list_workstation_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workstation_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::Workstations::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_workstation_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workstation_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_workstation_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstation_configs, "workstation_configs", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all workstation configurations in the specified cluster on which - # the caller has the "workstations.workstation.create" permission. - # - # @overload list_usable_workstation_configs(request, options = nil) - # Pass arguments to `list_usable_workstation_configs` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_usable_workstation_configs(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_usable_workstation_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. Parent resource name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::WorkstationConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new - # - # # Call the list_usable_workstation_configs method. - # result = client.list_usable_workstation_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::Workstations::V1beta::WorkstationConfig. - # p item - # end - # - def list_usable_workstation_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_usable_workstation_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::Workstations::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_usable_workstation_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_usable_workstation_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_usable_workstation_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_usable_workstation_configs, "workstation_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 a new workstation configuration. - # - # @overload create_workstation_config(request, options = nil) - # Pass arguments to `create_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workstation_config(parent: nil, workstation_config_id: nil, workstation_config: nil, validate_only: nil) - # Pass arguments to `create_workstation_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. Parent resource name. - # @param workstation_config_id [::String] - # Required. ID to use for the workstation configuration. - # @param workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash] - # Required. Config to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new - # - # # Call the create_workstation_config method. - # result = client.create_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def create_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest - - # Converts hash and nil to an 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_workstation_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::Workstations::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_workstation_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.create_workstation_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Updates an existing workstation configuration. - # - # @overload update_workstation_config(request, options = nil) - # Pass arguments to `update_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workstation_config(workstation_config: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation_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 workstation_config [::Google::Cloud::Workstations::V1beta::WorkstationConfig, ::Hash] - # Required. Config to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration will be created. In this situation, - # update_mask is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new - # - # # Call the update_workstation_config method. - # result = client.update_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def update_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_workstation_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::Workstations::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workstation_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.update_workstation_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Deletes the specified workstation configuration. - # - # @overload delete_workstation_config(request, options = nil) - # Pass arguments to `delete_workstation_config` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workstation_config(name: nil, validate_only: nil, etag: nil, force: nil) - # Pass arguments to `delete_workstation_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 workstation configuration to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request is rejected if the latest version of the - # workstation configuration on the server does not have this ETag. - # @param force [::Boolean] - # Optional. If set, any workstations in the workstation configuration are - # also deleted. Otherwise, the request works only if the workstation - # configuration has no workstations. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new - # - # # Call the delete_workstation_config method. - # result = client.delete_workstation_config request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def delete_workstation_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_workstation_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::Workstations::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_workstation_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workstation_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.delete_workstation_config request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns the requested workstation. - # - # @overload get_workstation(request, options = nil) - # Pass arguments to `get_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::GetWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::GetWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_workstation(name: nil) - # Pass arguments to `get_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the requested resource. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::Workstation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::Workstation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new - # - # # Call the get_workstation method. - # result = client.get_workstation request - # - # # The returned object is of type Google::Cloud::Workstations::V1beta::Workstation. - # p result - # - def get_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.get_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.get_workstation request, 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 all Workstations using the specified workstation configuration. - # - # @overload list_workstations(request, options = nil) - # Pass arguments to `list_workstations` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_workstations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_workstations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::Workstation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new - # - # # Call the list_workstations method. - # result = client.list_workstations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. - # p item - # end - # - def list_workstations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_workstations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_workstations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_workstations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_workstations, "workstations", request, result, options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns all workstations using the specified workstation configuration - # on which the caller has the "workstations.workstations.use" permission. - # - # @overload list_usable_workstations(request, options = nil) - # Pass arguments to `list_usable_workstations` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_usable_workstations(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_usable_workstations` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param page_size [::Integer] - # Optional. Maximum number of items to return. - # @param page_token [::String] - # Optional. 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::Workstations::V1beta::Workstation>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Workstations::V1beta::Workstation>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new - # - # # Call the list_usable_workstations method. - # result = client.list_usable_workstations request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. - # p item - # end - # - def list_usable_workstations request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.list_usable_workstations.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_usable_workstations.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_usable_workstations.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.list_usable_workstations request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @workstations_stub, :list_usable_workstations, "workstations", request, result, 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 workstation. - # - # @overload create_workstation(request, options = nil) - # Pass arguments to `create_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload create_workstation(parent: nil, workstation_id: nil, workstation: nil, validate_only: nil) - # Pass arguments to `create_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify 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 name. - # @param workstation_id [::String] - # Required. ID to use for the workstation. - # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash] - # Required. Workstation to create. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new - # - # # Call the create_workstation method. - # result = client.create_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest - - # Converts hash and nil to an 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.create_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation. - # - # @overload update_workstation(request, options = nil) - # Pass arguments to `update_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload update_workstation(workstation: nil, update_mask: nil, validate_only: nil, allow_missing: nil) - # Pass arguments to `update_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param workstation [::Google::Cloud::Workstations::V1beta::Workstation, ::Hash] - # Required. Workstation to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param allow_missing [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration is created. In this situation, update_mask - # is ignored. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new - # - # # Call the update_workstation method. - # result = client.update_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.update_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.update_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.update_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 workstation. - # - # @overload delete_workstation(request, options = nil) - # Pass arguments to `delete_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `delete_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to delete. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new - # - # # Call the delete_workstation method. - # result = client.delete_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.delete_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.delete_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: 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 running a workstation so that users can connect to it. - # - # @overload start_workstation(request, options = nil) - # Pass arguments to `start_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::StartWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::StartWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `start_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to start. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new - # - # # Call the start_workstation method. - # result = client.start_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest - - # Converts hash and nil to an 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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.start_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.start_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.start_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Stops running a workstation, reducing costs. - # - # @overload stop_workstation(request, options = nil) - # Pass arguments to `stop_workstation` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::StopWorkstationRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::StopWorkstationRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_workstation(name: nil, validate_only: nil, etag: nil) - # Pass arguments to `stop_workstation` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the workstation to stop. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @param etag [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Operation] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new - # - # # Call the stop_workstation method. - # result = client.stop_workstation request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_workstation request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest - - # Converts hash and nil to an 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_workstation.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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.stop_workstation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.stop_workstation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.stop_workstation request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a short-lived credential that can be used to send authenticated and - # authorized traffic to a workstation. - # - # @overload generate_access_token(request, options = nil) - # Pass arguments to `generate_access_token` via a request object, either of type - # {::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_token(expire_time: nil, ttl: nil, workstation: nil) - # Pass arguments to `generate_access_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param expire_time [::Google::Protobuf::Timestamp, ::Hash] - # Desired expiration time of the access token. This value must - # be at most 24 hours in the future. If a value is not specified, the - # token's expiration time will be set to a default value of 1 hour in the - # future. - # - # Note: The following parameters are mutually exclusive: `expire_time`, `ttl`. 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 ttl [::Google::Protobuf::Duration, ::Hash] - # Desired lifetime duration of the access token. This value must - # be at most 24 hours. If a value is not specified, the token's lifetime - # will be set to a default value of 1 hour. - # - # Note: The following parameters are mutually exclusive: `ttl`, `expire_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 workstation [::String] - # Required. Name of the workstation for which the access token should be - # generated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/workstations/v1beta" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new - # - # # Call the generate_access_token method. - # result = client.generate_access_token request - # - # # The returned object is of type Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse. - # p result - # - def generate_access_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest - - # Converts hash and nil to an 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_access_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Workstations::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.generate_access_token.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_access_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @workstations_stub.generate_access_token request, 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 Workstations REST API. - # - # This class represents the configuration for Workstations 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::Workstations::V1beta::Workstations::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_workstation_cluster to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_workstation_cluster.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_workstation_cluster.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workstations.googleapis.com" - - config_attr :endpoint, nil, ::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 Workstations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `get_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation_cluster - ## - # RPC-specific configuration for `list_workstation_clusters` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstation_clusters - ## - # RPC-specific configuration for `create_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation_cluster - ## - # RPC-specific configuration for `update_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation_cluster - ## - # RPC-specific configuration for `delete_workstation_cluster` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation_cluster - ## - # RPC-specific configuration for `get_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation_config - ## - # RPC-specific configuration for `list_workstation_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstation_configs - ## - # RPC-specific configuration for `list_usable_workstation_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_usable_workstation_configs - ## - # RPC-specific configuration for `create_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation_config - ## - # RPC-specific configuration for `update_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation_config - ## - # RPC-specific configuration for `delete_workstation_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation_config - ## - # RPC-specific configuration for `get_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_workstation - ## - # RPC-specific configuration for `list_workstations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_workstations - ## - # RPC-specific configuration for `list_usable_workstations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_usable_workstations - ## - # RPC-specific configuration for `create_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :create_workstation - ## - # RPC-specific configuration for `update_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :update_workstation - ## - # RPC-specific configuration for `delete_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_workstation - ## - # RPC-specific configuration for `start_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :start_workstation - ## - # RPC-specific configuration for `stop_workstation` - # @return [::Gapic::Config::Method] - # - attr_reader :stop_workstation - ## - # RPC-specific configuration for `generate_access_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_access_token - - # @private - def initialize parent_rpcs = nil - get_workstation_cluster_config = parent_rpcs.get_workstation_cluster if parent_rpcs.respond_to? :get_workstation_cluster - @get_workstation_cluster = ::Gapic::Config::Method.new get_workstation_cluster_config - list_workstation_clusters_config = parent_rpcs.list_workstation_clusters if parent_rpcs.respond_to? :list_workstation_clusters - @list_workstation_clusters = ::Gapic::Config::Method.new list_workstation_clusters_config - create_workstation_cluster_config = parent_rpcs.create_workstation_cluster if parent_rpcs.respond_to? :create_workstation_cluster - @create_workstation_cluster = ::Gapic::Config::Method.new create_workstation_cluster_config - update_workstation_cluster_config = parent_rpcs.update_workstation_cluster if parent_rpcs.respond_to? :update_workstation_cluster - @update_workstation_cluster = ::Gapic::Config::Method.new update_workstation_cluster_config - delete_workstation_cluster_config = parent_rpcs.delete_workstation_cluster if parent_rpcs.respond_to? :delete_workstation_cluster - @delete_workstation_cluster = ::Gapic::Config::Method.new delete_workstation_cluster_config - get_workstation_config_config = parent_rpcs.get_workstation_config if parent_rpcs.respond_to? :get_workstation_config - @get_workstation_config = ::Gapic::Config::Method.new get_workstation_config_config - list_workstation_configs_config = parent_rpcs.list_workstation_configs if parent_rpcs.respond_to? :list_workstation_configs - @list_workstation_configs = ::Gapic::Config::Method.new list_workstation_configs_config - list_usable_workstation_configs_config = parent_rpcs.list_usable_workstation_configs if parent_rpcs.respond_to? :list_usable_workstation_configs - @list_usable_workstation_configs = ::Gapic::Config::Method.new list_usable_workstation_configs_config - create_workstation_config_config = parent_rpcs.create_workstation_config if parent_rpcs.respond_to? :create_workstation_config - @create_workstation_config = ::Gapic::Config::Method.new create_workstation_config_config - update_workstation_config_config = parent_rpcs.update_workstation_config if parent_rpcs.respond_to? :update_workstation_config - @update_workstation_config = ::Gapic::Config::Method.new update_workstation_config_config - delete_workstation_config_config = parent_rpcs.delete_workstation_config if parent_rpcs.respond_to? :delete_workstation_config - @delete_workstation_config = ::Gapic::Config::Method.new delete_workstation_config_config - get_workstation_config = parent_rpcs.get_workstation if parent_rpcs.respond_to? :get_workstation - @get_workstation = ::Gapic::Config::Method.new get_workstation_config - list_workstations_config = parent_rpcs.list_workstations if parent_rpcs.respond_to? :list_workstations - @list_workstations = ::Gapic::Config::Method.new list_workstations_config - list_usable_workstations_config = parent_rpcs.list_usable_workstations if parent_rpcs.respond_to? :list_usable_workstations - @list_usable_workstations = ::Gapic::Config::Method.new list_usable_workstations_config - create_workstation_config = parent_rpcs.create_workstation if parent_rpcs.respond_to? :create_workstation - @create_workstation = ::Gapic::Config::Method.new create_workstation_config - update_workstation_config = parent_rpcs.update_workstation if parent_rpcs.respond_to? :update_workstation - @update_workstation = ::Gapic::Config::Method.new update_workstation_config - delete_workstation_config = parent_rpcs.delete_workstation if parent_rpcs.respond_to? :delete_workstation - @delete_workstation = ::Gapic::Config::Method.new delete_workstation_config - start_workstation_config = parent_rpcs.start_workstation if parent_rpcs.respond_to? :start_workstation - @start_workstation = ::Gapic::Config::Method.new start_workstation_config - stop_workstation_config = parent_rpcs.stop_workstation if parent_rpcs.respond_to? :stop_workstation - @stop_workstation = ::Gapic::Config::Method.new stop_workstation_config - generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token - @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb deleted file mode 100644 index 582c87e5cfde..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/operations.rb +++ /dev/null @@ -1,925 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "gapic/operation" - -module Google - module Cloud - module Workstations - module V1beta - module Workstations - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "workstations.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Workstations 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 Workstations 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::Workstations::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::Workstations::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::Workstations::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::Workstations::V1beta::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_operation.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @operations_stub.cancel_operation request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Configuration class for the Operations REST API. - # - # This class represents the configuration for Operations REST, - # providing control over timeouts, retry behavior, logging, transport - # parameters, and other low-level controls. Certain parameters can also be - # applied individually to specific RPCs. See - # {::Google::Longrunning::Operations::Rest::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # list_operations to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Longrunning::Operations::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Longrunning::Operations::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_operations.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "workstations.googleapis.com" - - config_attr :endpoint, nil, ::String, nil - config_attr :credentials, nil do |value| - allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Google::Auth::BaseClient, ::Signet::OAuth2::Client, nil] - allowed.any? { |klass| klass === value } - end - config_attr :scope, nil, ::String, ::Array, nil - config_attr :lib_name, nil, ::String, nil - config_attr :lib_version, nil, ::String, nil - config_attr :timeout, nil, ::Numeric, nil - config_attr :metadata, nil, ::Hash, nil - config_attr :retry_policy, nil, ::Hash, ::Proc, nil - config_attr :quota_project, nil, ::String, nil - config_attr :universe_domain, nil, ::String, nil - config_attr :logger, :default, ::Logger, nil, :default - - # @private - def initialize parent_config = nil - @parent_config = parent_config unless parent_config.nil? - - yield self if block_given? - end - - ## - # Configurations for individual RPCs - # @return [Rpcs] - # - def rpcs - @rpcs ||= begin - parent_rpcs = nil - parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs) - Rpcs.new parent_rpcs - end - end - - ## - # Configuration RPC class for the Operations API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `list_operations` - # @return [::Gapic::Config::Method] - # - attr_reader :list_operations - ## - # RPC-specific configuration for `get_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :get_operation - ## - # RPC-specific configuration for `delete_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_operation - ## - # RPC-specific configuration for `cancel_operation` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_operation - - # @private - def initialize parent_rpcs = nil - list_operations_config = parent_rpcs.list_operations if parent_rpcs.respond_to? :list_operations - @list_operations = ::Gapic::Config::Method.new list_operations_config - get_operation_config = parent_rpcs.get_operation if parent_rpcs.respond_to? :get_operation - @get_operation = ::Gapic::Config::Method.new get_operation_config - delete_operation_config = parent_rpcs.delete_operation if parent_rpcs.respond_to? :delete_operation - @delete_operation = ::Gapic::Config::Method.new delete_operation_config - cancel_operation_config = parent_rpcs.cancel_operation if parent_rpcs.respond_to? :cancel_operation - @cancel_operation = ::Gapic::Config::Method.new cancel_operation_config - - yield self if block_given? - end - end - end - end - - ## - # @private - # REST service stub for the Longrunning Operations API. - # Service stub contains baseline method implementations - # including transcoding, making the REST call, and deserialing the response. - class OperationsServiceStub - def initialize endpoint:, endpoint_template:, universe_domain:, credentials: - # These require statements are intentionally placed here to initialize - # the REST modules only when it's required. - require "gapic/rest" - - @client_stub = ::Gapic::Rest::ClientStub.new endpoint: endpoint, - endpoint_template: endpoint_template, - universe_domain: universe_domain, - credentials: credentials - end - - ## - # Baseline implementation for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::ListOperationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::ListOperationsResponse] - # A result object deserialized from the server's reply - def list_operations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_list_operations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_operations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::ListOperationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def get_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_get_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def delete_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_delete_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Protobuf::Empty] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Protobuf::Empty] - # A result object deserialized from the server's reply - def cancel_operation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = OperationsServiceStub.transcode_cancel_operation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "cancel_operation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Protobuf::Empty.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # @private - # - # GRPC transcoding helper method for the list_operations REST call - # - # @param request_pb [::Google::Longrunning::ListOperationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_operations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/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-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb deleted file mode 100644 index 402c25eda4b8..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations/rest/service_stub.rb +++ /dev/null @@ -1,1310 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workstations/v1beta/workstations_pb" - -module Google - module Cloud - module Workstations - module V1beta - module Workstations - module Rest - ## - # REST service stub for the Workstations 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_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::WorkstationCluster] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] - # A result object deserialized from the server's reply - def get_workstation_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_workstation_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1beta::WorkstationCluster.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workstation_clusters REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse] - # A result object deserialized from the server's reply - def list_workstation_clusters request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workstation_clusters_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_workstation_clusters", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse.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_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_workstation_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_workstation_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_cluster request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_cluster_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workstation_cluster", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::WorkstationConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] - # A result object deserialized from the server's reply - def get_workstation_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_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_workstation_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1beta::WorkstationConfig.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workstation_configs REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse] - # A result object deserialized from the server's reply - def list_workstation_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workstation_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_workstation_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_usable_workstation_configs REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse] - # A result object deserialized from the server's reply - def list_usable_workstation_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_usable_workstation_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_usable_workstation_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse.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_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_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_workstation_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_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_workstation_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_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_workstation_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the get_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::Workstation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::Workstation] - # A result object deserialized from the server's reply - def get_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "get_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1beta::Workstation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_workstations REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse] - # A result object deserialized from the server's reply - def list_workstations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_workstations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_workstations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the list_usable_workstations REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse] - # A result object deserialized from the server's reply - def list_usable_workstations request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_usable_workstations_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "list_usable_workstations", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse.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_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the update_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "update_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the delete_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "delete_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::StartWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_start_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::StopWorkstationRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_workstation request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_stop_workstation_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_workstation", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Longrunning::Operation.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_access_token REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse] - # A result object deserialized from the server's reply - def generate_access_token request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_access_token_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_token", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse.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_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workstation_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workstation_clusters REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workstation_clusters_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/workstationClusters", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest] - # 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_workstation_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/workstationClusters", - body: "workstation_cluster", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workstation_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{workstation_cluster.name}", - body: "workstation_cluster", - matches: [ - ["workstation_cluster.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workstation_cluster REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workstation_cluster_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workstation_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workstation_configs REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workstation_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/workstationConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_usable_workstation_configs REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_usable_workstation_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/workstationConfigs:listUsable", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest] - # 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_workstation_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/workstationConfigs", - body: "workstation_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workstation_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{workstation_config.name}", - body: "workstation_config", - matches: [ - ["workstation_config.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workstation_config REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workstation_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::GetWorkstationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_workstations REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_workstations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/workstations", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_usable_workstations REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_list_usable_workstations_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1beta/{parent}/workstations:listUsable", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest] - # 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_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{parent}/workstations", - body: "workstation", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_update_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1beta/{workstation.name}", - body: "workstation", - matches: [ - ["workstation.name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1beta/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the start_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::StartWorkstationRequest] - # 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_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:start", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the stop_workstation REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::StopWorkstationRequest] - # 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_workstation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{name}:stop", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_access_token REST call - # - # @param request_pb [::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest] - # 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_access_token_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1beta/{workstation}:generateAccessToken", - body: "*", - matches: [ - ["workstation", %r{^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb deleted file mode 100644 index b5efedb0b871..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_pb.rb +++ /dev/null @@ -1,100 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/workstations/v1beta/workstations.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/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n3google/cloud/workstations/v1beta/workstations.proto\x12 google.cloud.workstations.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\x1egoogle/protobuf/duration.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x17google/rpc/status.proto\"\x93\t\n\x12WorkstationCluster\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12_\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x45.google.cloud.workstations.v1beta.WorkstationCluster.AnnotationsEntryB\x03\xe0\x41\x01\x12U\n\x06labels\x18\x0f \x03(\x0b\x32@.google.cloud.workstations.v1beta.WorkstationCluster.LabelsEntryB\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\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07network\x18\n \x01(\tB\x03\xe0\x41\x05\x12\x17\n\nsubnetwork\x18\x0b \x01(\tB\x03\xe0\x41\x05\x12\x1d\n\x10\x63ontrol_plane_ip\x18\x10 \x01(\tB\x03\xe0\x41\x03\x12n\n\x16private_cluster_config\x18\x0c \x01(\x0b\x32I.google.cloud.workstations.v1beta.WorkstationCluster.PrivateClusterConfigB\x03\xe0\x41\x01\x12\x15\n\x08\x64\x65graded\x18\r \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x0e \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x1a\x9f\x01\n\x14PrivateClusterConfig\x12$\n\x17\x65nable_private_endpoint\x18\x01 \x01(\x08\x42\x03\xe0\x41\x05\x12\x1d\n\x10\x63luster_hostname\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16service_attachment_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10\x61llowed_projects\x18\x04 \x03(\tB\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xb3\x01\xea\x41\xaf\x01\n.workstations.googleapis.com/WorkstationCluster\x12Qprojects/{project}/locations/{location}/workstationClusters/{workstation_cluster}*\x13workstationClusters2\x12workstationClusterR\x01\x01\"\xc2\x1e\n\x11WorkstationConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12^\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32\x44.google.cloud.workstations.v1beta.WorkstationConfig.AnnotationsEntryB\x03\xe0\x41\x01\x12T\n\x06labels\x18\x12 \x03(\x0b\x32?.google.cloud.workstations.v1beta.WorkstationConfig.LabelsEntryB\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\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0cidle_timeout\x18\n \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0frunning_timeout\x18\x0b \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12K\n\x04host\x18\x0c \x01(\x0b\x32\x38.google.cloud.workstations.v1beta.WorkstationConfig.HostB\x03\xe0\x41\x01\x12l\n\x16persistent_directories\x18\r \x03(\x0b\x32G.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectoryB\x03\xe0\x41\x01\x12j\n\x15\x65phemeral_directories\x18\x16 \x03(\x0b\x32\x46.google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectoryB\x03\xe0\x41\x01\x12U\n\tcontainer\x18\x0e \x01(\x0b\x32=.google.cloud.workstations.v1beta.WorkstationConfig.ContainerB\x03\xe0\x41\x01\x12\x66\n\x0e\x65ncryption_key\x18\x11 \x01(\x0b\x32I.google.cloud.workstations.v1beta.WorkstationConfig.CustomerEncryptionKeyB\x03\xe0\x41\x05\x12\x61\n\x10readiness_checks\x18\x13 \x03(\x0b\x32\x42.google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheckB\x03\xe0\x41\x01\x12\x1d\n\rreplica_zones\x18\x17 \x03(\tB\x06\xe0\x41\x01\xe0\x41\x05\x12\x15\n\x08\x64\x65graded\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12+\n\nconditions\x18\x10 \x03(\x0b\x32\x12.google.rpc.StatusB\x03\xe0\x41\x03\x12\x1f\n\x12\x65nable_audit_agent\x18\x14 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xa4\x08\n\x04Host\x12\\\n\x0cgce_instance\x18\x01 \x01(\x0b\x32\x44.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstanceH\x00\x1a\xb3\x07\n\x0bGceInstance\x12\x19\n\x0cmachine_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fservice_account\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12#\n\x16service_account_scopes\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04tags\x18\x04 \x03(\tB\x03\xe0\x41\x01\x12\x16\n\tpool_size\x18\x05 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1d\n\x10pooled_instances\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12(\n\x1b\x64isable_public_ip_addresses\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\x12)\n\x1c\x65nable_nested_virtualization\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x85\x01\n\x18shielded_instance_config\x18\x08 \x01(\x0b\x32^.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceShieldedInstanceConfigB\x03\xe0\x41\x01\x12\x8d\x01\n\x1c\x63onfidential_instance_config\x18\n \x01(\x0b\x32\x62.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfigB\x03\xe0\x41\x01\x12\x1e\n\x11\x62oot_disk_size_gb\x18\t \x01(\x05\x42\x03\xe0\x41\x01\x12k\n\x0c\x61\x63\x63\x65lerators\x18\x0b \x03(\x0b\x32P.google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.AcceleratorB\x03\xe0\x41\x01\x1a\x80\x01\n\x19GceShieldedInstanceConfig\x12\x1f\n\x12\x65nable_secure_boot\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0b\x65nable_vtpm\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12(\n\x1b\x65nable_integrity_monitoring\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1aI\n\x1dGceConfidentialInstanceConfig\x12(\n\x1b\x65nable_confidential_compute\x18\x01 \x01(\x08\x42\x03\xe0\x41\x01\x1a\x34\n\x0b\x41\x63\x63\x65lerator\x12\x11\n\x04type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x63ount\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x42\x08\n\x06\x63onfig\x1a\x8d\x04\n\x13PersistentDirectory\x12s\n\x06gce_pd\x18\x02 \x01(\x0b\x32\x61.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDiskH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a\xd5\x02\n\x19GceRegionalPersistentDisk\x12\x14\n\x07size_gb\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x14\n\x07\x66s_type\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tdisk_type\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x8c\x01\n\x0ereclaim_policy\x18\x04 \x01(\x0e\x32o.google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicyB\x03\xe0\x41\x01\"G\n\rReclaimPolicy\x12\x1e\n\x1aRECLAIM_POLICY_UNSPECIFIED\x10\x00\x12\n\n\x06\x44\x45LETE\x10\x01\x12\n\n\x06RETAIN\x10\x02\x42\x10\n\x0e\x64irectory_type\x1a\xa9\x02\n\x12\x45phemeralDirectory\x12j\n\x06gce_pd\x18\x03 \x01(\x0b\x32X.google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDiskH\x00\x12\x17\n\nmount_path\x18\x01 \x01(\tB\x03\xe0\x41\x02\x1a|\n\x11GcePersistentDisk\x12\x16\n\tdisk_type\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1c\n\x0fsource_snapshot\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x19\n\x0csource_image\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tread_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x42\x10\n\x0e\x64irectory_type\x1a\x82\x02\n\tContainer\x12\x12\n\x05image\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x63ommand\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x61rgs\x18\x03 \x03(\tB\x03\xe0\x41\x01\x12X\n\x03\x65nv\x18\x04 \x03(\x0b\x32\x46.google.cloud.workstations.v1beta.WorkstationConfig.Container.EnvEntryB\x03\xe0\x41\x01\x12\x18\n\x0bworking_dir\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0brun_as_user\x18\x06 \x01(\x05\x42\x03\xe0\x41\x01\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1aS\n\x15\x43ustomerEncryptionKey\x12\x14\n\x07kms_key\x18\x01 \x01(\tB\x03\xe0\x41\x05\x12$\n\x17kms_key_service_account\x18\x02 \x01(\tB\x03\xe0\x41\x05\x1a\x36\n\x0eReadinessCheck\x12\x11\n\x04path\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04port\x18\x02 \x01(\x05\x42\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\xd8\x01\xea\x41\xd4\x01\n-workstations.googleapis.com/WorkstationConfig\x12yprojects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}*\x12workstationConfigs2\x11workstationConfigR\x01\x01\"\xfe\x08\n\x0bWorkstation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0breconciling\x18\x04 \x01(\x08\x42\x03\xe0\x41\x03\x12X\n\x0b\x61nnotations\x18\x05 \x03(\x0b\x32>.google.cloud.workstations.v1beta.Workstation.AnnotationsEntryB\x03\xe0\x41\x01\x12N\n\x06labels\x18\r \x03(\x0b\x32\x39.google.cloud.workstations.v1beta.Workstation.LabelsEntryB\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\x33\n\nstart_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x64\x65lete_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\t \x01(\tB\x03\xe0\x41\x01\x12G\n\x05state\x18\n \x01(\x0e\x32\x33.google.cloud.workstations.v1beta.Workstation.StateB\x03\xe0\x41\x03\x12\x11\n\x04host\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12H\n\x03\x65nv\x18\x0c \x03(\x0b\x32\x36.google.cloud.workstations.v1beta.Workstation.EnvEntryB\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a*\n\x08\x45nvEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"l\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x12\n\x0eSTATE_STARTING\x10\x01\x12\x11\n\rSTATE_RUNNING\x10\x02\x12\x12\n\x0eSTATE_STOPPING\x10\x03\x12\x11\n\rSTATE_STOPPED\x10\x04:\xe2\x01\xea\x41\xde\x01\n\'workstations.googleapis.com/Workstation\x12\x94\x01projects/{project}/locations/{location}/workstationClusters/{workstation_cluster}/workstationConfigs/{workstation_config}/workstations/{workstation}*\x0cworkstations2\x0bworkstationR\x01\x01\"d\n\x1cGetWorkstationClusterRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\"\x99\x01\n\x1eListWorkstationClustersRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.workstations.googleapis.com/WorkstationCluster\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\"\xa3\x01\n\x1fListWorkstationClustersResponse\x12R\n\x14workstation_clusters\x18\x01 \x03(\x0b\x32\x34.google.cloud.workstations.v1beta.WorkstationCluster\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x82\x02\n\x1f\x43reateWorkstationClusterRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\x12.workstations.googleapis.com/WorkstationCluster\x12#\n\x16workstation_cluster_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12V\n\x13workstation_cluster\x18\x03 \x01(\x0b\x32\x34.google.cloud.workstations.v1beta.WorkstationClusterB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe7\x01\n\x1fUpdateWorkstationClusterRequest\x12V\n\x13workstation_cluster\x18\x01 \x01(\x0b\x32\x34.google.cloud.workstations.v1beta.WorkstationClusterB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xaa\x01\n\x1f\x44\x65leteWorkstationClusterRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"b\n\x1bGetWorkstationConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\"\x98\x01\n\x1dListWorkstationConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\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\"\xa0\x01\n\x1eListWorkstationConfigsResponse\x12P\n\x13workstation_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.workstations.v1beta.WorkstationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x9e\x01\n#ListUsableWorkstationConfigsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\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\"\xa6\x01\n$ListUsableWorkstationConfigsResponse\x12P\n\x13workstation_configs\x18\x01 \x03(\x0b\x32\x33.google.cloud.workstations.v1beta.WorkstationConfig\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xfe\x01\n\x1e\x43reateWorkstationConfigRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.workstations.googleapis.com/WorkstationCluster\x12\"\n\x15workstation_config_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12T\n\x12workstation_config\x18\x03 \x01(\x0b\x32\x33.google.cloud.workstations.v1beta.WorkstationConfigB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xe4\x01\n\x1eUpdateWorkstationConfigRequest\x12T\n\x12workstation_config\x18\x01 \x01(\x0b\x32\x33.google.cloud.workstations.v1beta.WorkstationConfigB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x1e\x44\x65leteWorkstationConfigRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"V\n\x15GetWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\"\x91\x01\n\x17ListWorkstationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\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\"\x97\x01\n\x18ListWorkstationsResponse\x12\x43\n\x0cworkstations\x18\x01 \x03(\x0b\x32-.google.cloud.workstations.v1beta.Workstation\x12\x1c\n\x0fnext_page_token\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x97\x01\n\x1dListUsableWorkstationsRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\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\"\x93\x01\n\x1eListUsableWorkstationsResponse\x12\x43\n\x0cworkstations\x18\x01 \x03(\x0b\x32-.google.cloud.workstations.v1beta.Workstation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe3\x01\n\x18\x43reateWorkstationRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-workstations.googleapis.com/WorkstationConfig\x12\x1b\n\x0eworkstation_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12G\n\x0bworkstation\x18\x03 \x01(\x0b\x32-.google.cloud.workstations.v1beta.WorkstationB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xd1\x01\n\x18UpdateWorkstationRequest\x12G\n\x0bworkstation\x18\x01 \x01(\x0b\x32-.google.cloud.workstations.v1beta.WorkstationB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x88\x01\n\x18\x44\x65leteWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x87\x01\n\x17StartWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x86\x01\n\x16StopWorkstationRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/Workstation\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xcd\x01\n\x1aGenerateAccessTokenRequest\x12\x31\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12(\n\x03ttl\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationH\x00\x12\x44\n\x0bworkstation\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'workstations.googleapis.com/WorkstationB\x0c\n\nexpiration\"d\n\x1bGenerateAccessTokenResponse\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\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\xdf+\n\x0cWorkstations\x12\xd9\x01\n\x15GetWorkstationCluster\x12>.google.cloud.workstations.v1beta.GetWorkstationClusterRequest\x1a\x34.google.cloud.workstations.v1beta.WorkstationCluster\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1beta/{name=projects/*/locations/*/workstationClusters/*}\x12\xec\x01\n\x17ListWorkstationClusters\x12@.google.cloud.workstations.v1beta.ListWorkstationClustersRequest\x1a\x41.google.cloud.workstations.v1beta.ListWorkstationClustersResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1beta/{parent=projects/*/locations/*}/workstationClusters\x12\xb5\x02\n\x18\x43reateWorkstationCluster\x12\x41.google.cloud.workstations.v1beta.CreateWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x31parent,workstation_cluster,workstation_cluster_id\x82\xd3\xe4\x93\x02R\";/v1beta/{parent=projects/*/locations/*}/workstationClusters:\x13workstation_cluster\x12\xb7\x02\n\x18UpdateWorkstationCluster\x12\x41.google.cloud.workstations.v1beta.UpdateWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"\xb8\x01\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x1fworkstation_cluster,update_mask\x82\xd3\xe4\x93\x02\x66\x32O/v1beta/{workstation_cluster.name=projects/*/locations/*/workstationClusters/*}:\x13workstation_cluster\x12\xf2\x01\n\x18\x44\x65leteWorkstationCluster\x12\x41.google.cloud.workstations.v1beta.DeleteWorkstationClusterRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\'\n\x12WorkstationCluster\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1beta/{name=projects/*/locations/*/workstationClusters/*}\x12\xeb\x01\n\x14GetWorkstationConfig\x12=.google.cloud.workstations.v1beta.GetWorkstationConfigRequest\x1a\x33.google.cloud.workstations.v1beta.WorkstationConfig\"_\xda\x41\x04name\x82\xd3\xe4\x93\x02R\x12P/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}\x12\xfe\x01\n\x16ListWorkstationConfigs\x12?.google.cloud.workstations.v1beta.ListWorkstationConfigsRequest\x1a@.google.cloud.workstations.v1beta.ListWorkstationConfigsResponse\"a\xda\x41\x06parent\x82\xd3\xe4\x93\x02R\x12P/v1beta/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs\x12\x9b\x02\n\x1cListUsableWorkstationConfigs\x12\x45.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest\x1a\x46.google.cloud.workstations.v1beta.ListUsableWorkstationConfigsResponse\"l\xda\x41\x06parent\x82\xd3\xe4\x93\x02]\x12[/v1beta/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs:listUsable\x12\xc4\x02\n\x17\x43reateWorkstationConfig\x12@.google.cloud.workstations.v1beta.CreateWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc7\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41/parent,workstation_config,workstation_config_id\x82\xd3\xe4\x93\x02\x66\"P/v1beta/{parent=projects/*/locations/*/workstationClusters/*}/workstationConfigs:\x12workstation_config\x12\xc6\x02\n\x17UpdateWorkstationConfig\x12@.google.cloud.workstations.v1beta.UpdateWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\xc9\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41\x1eworkstation_config,update_mask\x82\xd3\xe4\x93\x02y2c/v1beta/{workstation_config.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}:\x12workstation_config\x12\x85\x02\n\x17\x44\x65leteWorkstationConfig\x12@.google.cloud.workstations.v1beta.DeleteWorkstationConfigRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41&\n\x11WorkstationConfig\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02R*P/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}\x12\xe8\x01\n\x0eGetWorkstation\x12\x37.google.cloud.workstations.v1beta.GetWorkstationRequest\x1a-.google.cloud.workstations.v1beta.Workstation\"n\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61\x12_/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}\x12\xfb\x01\n\x10ListWorkstations\x12\x39.google.cloud.workstations.v1beta.ListWorkstationsRequest\x1a:.google.cloud.workstations.v1beta.ListWorkstationsResponse\"p\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x61\x12_/v1beta/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations\x12\x98\x02\n\x16ListUsableWorkstations\x12?.google.cloud.workstations.v1beta.ListUsableWorkstationsRequest\x1a@.google.cloud.workstations.v1beta.ListUsableWorkstationsResponse\"{\xda\x41\x06parent\x82\xd3\xe4\x93\x02l\x12j/v1beta/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations:listUsable\x12\xac\x02\n\x11\x43reateWorkstation\x12:.google.cloud.workstations.v1beta.CreateWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\xbb\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41!parent,workstation,workstation_id\x82\xd3\xe4\x93\x02n\"_/v1beta/{parent=projects/*/locations/*/workstationClusters/*/workstationConfigs/*}/workstations:\x0bworkstation\x12\xae\x02\n\x11UpdateWorkstation\x12:.google.cloud.workstations.v1beta.UpdateWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\xbd\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x17workstation,update_mask\x82\xd3\xe4\x93\x02z2k/v1beta/{workstation.name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:\x0bworkstation\x12\x82\x02\n\x11\x44\x65leteWorkstation\x12:.google.cloud.workstations.v1beta.DeleteWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x61*_/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}\x12\x89\x02\n\x10StartWorkstation\x12\x39.google.cloud.workstations.v1beta.StartWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x9a\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02j\"e/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:start:\x01*\x12\x86\x02\n\x0fStopWorkstation\x12\x38.google.cloud.workstations.v1beta.StopWorkstationRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41 \n\x0bWorkstation\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02i\"d/v1beta/{name=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:stop:\x01*\x12\xa8\x02\n\x13GenerateAccessToken\x12<.google.cloud.workstations.v1beta.GenerateAccessTokenRequest\x1a=.google.cloud.workstations.v1beta.GenerateAccessTokenResponse\"\x93\x01\xda\x41\x0bworkstation\x82\xd3\xe4\x93\x02\x7f\"z/v1beta/{workstation=projects/*/locations/*/workstationClusters/*/workstationConfigs/*/workstations/*}:generateAccessToken:\x01*\x1aO\xca\x41\x1bworkstations.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\x85\x01\n$com.google.cloud.workstations.v1betaB\x11WorkstationsProtoP\x01ZHcloud.google.com/go/workstations/apiv1beta/workstationspb;workstationspbb\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.rpc.Status", "google/rpc/status.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Workstations - module V1beta - WorkstationCluster = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster").msgclass - WorkstationCluster::PrivateClusterConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationCluster.PrivateClusterConfig").msgclass - WorkstationConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig").msgclass - WorkstationConfig::Host = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host").msgclass - WorkstationConfig::Host::GceInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance").msgclass - WorkstationConfig::Host::GceInstance::GceShieldedInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceShieldedInstanceConfig").msgclass - WorkstationConfig::Host::GceInstance::GceConfidentialInstanceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.GceConfidentialInstanceConfig").msgclass - WorkstationConfig::Host::GceInstance::Accelerator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Host.GceInstance.Accelerator").msgclass - WorkstationConfig::PersistentDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory").msgclass - WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk").msgclass - WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.PersistentDirectory.GceRegionalPersistentDisk.ReclaimPolicy").enummodule - WorkstationConfig::EphemeralDirectory = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory").msgclass - WorkstationConfig::EphemeralDirectory::GcePersistentDisk = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.EphemeralDirectory.GcePersistentDisk").msgclass - WorkstationConfig::Container = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.Container").msgclass - WorkstationConfig::CustomerEncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.CustomerEncryptionKey").msgclass - WorkstationConfig::ReadinessCheck = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.WorkstationConfig.ReadinessCheck").msgclass - Workstation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation").msgclass - Workstation::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.Workstation.State").enummodule - GetWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GetWorkstationClusterRequest").msgclass - ListWorkstationClustersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationClustersRequest").msgclass - ListWorkstationClustersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationClustersResponse").msgclass - CreateWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.CreateWorkstationClusterRequest").msgclass - UpdateWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.UpdateWorkstationClusterRequest").msgclass - DeleteWorkstationClusterRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.DeleteWorkstationClusterRequest").msgclass - GetWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GetWorkstationConfigRequest").msgclass - ListWorkstationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationConfigsRequest").msgclass - ListWorkstationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationConfigsResponse").msgclass - ListUsableWorkstationConfigsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListUsableWorkstationConfigsRequest").msgclass - ListUsableWorkstationConfigsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListUsableWorkstationConfigsResponse").msgclass - CreateWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.CreateWorkstationConfigRequest").msgclass - UpdateWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.UpdateWorkstationConfigRequest").msgclass - DeleteWorkstationConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.DeleteWorkstationConfigRequest").msgclass - GetWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GetWorkstationRequest").msgclass - ListWorkstationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationsRequest").msgclass - ListWorkstationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListWorkstationsResponse").msgclass - ListUsableWorkstationsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListUsableWorkstationsRequest").msgclass - ListUsableWorkstationsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.ListUsableWorkstationsResponse").msgclass - CreateWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.CreateWorkstationRequest").msgclass - UpdateWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.UpdateWorkstationRequest").msgclass - DeleteWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.DeleteWorkstationRequest").msgclass - StartWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.StartWorkstationRequest").msgclass - StopWorkstationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.StopWorkstationRequest").msgclass - GenerateAccessTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GenerateAccessTokenRequest").msgclass - GenerateAccessTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.GenerateAccessTokenResponse").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.workstations.v1beta.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb b/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb deleted file mode 100644 index 90f2fe5da085..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/lib/google/cloud/workstations/v1beta/workstations_services_pb.rb +++ /dev/null @@ -1,86 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/workstations/v1beta/workstations.proto for package 'google.cloud.workstations.v1beta' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -require 'grpc' -require 'google/cloud/workstations/v1beta/workstations_pb' - -module Google - module Cloud - module Workstations - module V1beta - module Workstations - # Service for interacting with Cloud Workstations. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.workstations.v1beta.Workstations' - - # Returns the requested workstation cluster. - rpc :GetWorkstationCluster, ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest, ::Google::Cloud::Workstations::V1beta::WorkstationCluster - # Returns all workstation clusters in the specified location. - rpc :ListWorkstationClusters, ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest, ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse - # Creates a new workstation cluster. - rpc :CreateWorkstationCluster, ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest, ::Google::Longrunning::Operation - # Updates an existing workstation cluster. - rpc :UpdateWorkstationCluster, ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest, ::Google::Longrunning::Operation - # Deletes the specified workstation cluster. - rpc :DeleteWorkstationCluster, ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest, ::Google::Longrunning::Operation - # Returns the requested workstation configuration. - rpc :GetWorkstationConfig, ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest, ::Google::Cloud::Workstations::V1beta::WorkstationConfig - # Returns all workstation configurations in the specified cluster. - rpc :ListWorkstationConfigs, ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest, ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse - # Returns all workstation configurations in the specified cluster on which - # the caller has the "workstations.workstation.create" permission. - rpc :ListUsableWorkstationConfigs, ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest, ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse - # Creates a new workstation configuration. - rpc :CreateWorkstationConfig, ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest, ::Google::Longrunning::Operation - # Updates an existing workstation configuration. - rpc :UpdateWorkstationConfig, ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest, ::Google::Longrunning::Operation - # Deletes the specified workstation configuration. - rpc :DeleteWorkstationConfig, ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest, ::Google::Longrunning::Operation - # Returns the requested workstation. - rpc :GetWorkstation, ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest, ::Google::Cloud::Workstations::V1beta::Workstation - # Returns all Workstations using the specified workstation configuration. - rpc :ListWorkstations, ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest, ::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse - # Returns all workstations using the specified workstation configuration - # on which the caller has the "workstations.workstations.use" permission. - rpc :ListUsableWorkstations, ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest, ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse - # Creates a new workstation. - rpc :CreateWorkstation, ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest, ::Google::Longrunning::Operation - # Updates an existing workstation. - rpc :UpdateWorkstation, ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest, ::Google::Longrunning::Operation - # Deletes the specified workstation. - rpc :DeleteWorkstation, ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest, ::Google::Longrunning::Operation - # Starts running a workstation so that users can connect to it. - rpc :StartWorkstation, ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest, ::Google::Longrunning::Operation - # Stops running a workstation, reducing costs. - rpc :StopWorkstation, ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest, ::Google::Longrunning::Operation - # Returns a short-lived credential that can be used to send authenticated and - # authorized traffic to a workstation. - rpc :GenerateAccessToken, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/README.md b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/README.md deleted file mode 100644 index 3f70f22b3c09..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Workstations 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-workstations-v1beta/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb deleted file mode 100644 index dc2b64da78fb..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/cloud/workstations/v1beta/workstations.rb +++ /dev/null @@ -1,1265 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Workstations - module V1beta - # A workstation cluster resource in the Cloud Workstations API. - # - # Defines a group of workstations in a particular region and the - # VPC network they're attached to. - # @!attribute [rw] name - # @return [::String] - # Full name of this workstation cluster. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human-readable name for this workstation cluster. - # @!attribute [r] uid - # @return [::String] - # Output only. A system-assigned unique identifier for this workstation - # cluster. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Indicates whether this workstation cluster is currently being - # updated to match its intended state. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client-specified annotations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. - # [Labels](https://cloud.google.com/workstations/docs/label-resources) that - # are applied to the workstation cluster and that are also propagated to the - # underlying Compute Engine resources. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation cluster was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation cluster was most recently updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation cluster was soft-deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. Checksum computed by the server. May be sent on update and delete - # requests to make sure that the client has an up-to-date value before - # proceeding. - # @!attribute [rw] network - # @return [::String] - # Immutable. Name of the Compute Engine network in which instances associated - # with this workstation cluster will be created. - # @!attribute [rw] subnetwork - # @return [::String] - # Immutable. Name of the Compute Engine subnetwork in which instances - # associated with this workstation cluster will be created. Must be part of - # the subnetwork specified for this workstation cluster. - # @!attribute [r] control_plane_ip - # @return [::String] - # Output only. The private IP address of the control plane for this - # workstation cluster. Workstation VMs need access to this IP address to work - # with the service, so make sure that your firewall rules allow egress from - # the workstation VMs to this address. - # @!attribute [rw] private_cluster_config - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster::PrivateClusterConfig] - # Optional. Configuration for private workstation cluster. - # @!attribute [r] degraded - # @return [::Boolean] - # Output only. Whether this workstation cluster is in degraded mode, in which - # case it may require user action to restore full functionality. Details can - # be found in - # {::Google::Cloud::Workstations::V1beta::WorkstationCluster#conditions conditions}. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the workstation cluster's current - # state. - class WorkstationCluster - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration options for private workstation clusters. - # @!attribute [rw] enable_private_endpoint - # @return [::Boolean] - # Immutable. Whether Workstations endpoint is private. - # @!attribute [r] cluster_hostname - # @return [::String] - # Output only. Hostname for the workstation cluster. This field will be - # populated only when private endpoint is enabled. To access workstations - # in the workstation cluster, create a new DNS zone mapping this domain - # name to an internal IP address and a forwarding rule mapping that address - # to the service attachment. - # @!attribute [r] service_attachment_uri - # @return [::String] - # Output only. Service attachment URI for the workstation cluster. The - # service attachemnt is created when private endpoint is enabled. To access - # workstations in the workstation cluster, configure access to the managed - # service using [Private Service - # Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services). - # @!attribute [rw] allowed_projects - # @return [::Array<::String>] - # Optional. Additional projects that are allowed to attach to the - # workstation cluster's service attachment. By default, the workstation - # cluster's project and the VPC host project (if different) are allowed. - class PrivateClusterConfig - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A workstation configuration resource in the Cloud Workstations API. - # - # Workstation configurations act as templates for workstations. The workstation - # configuration defines details such as the workstation virtual machine (VM) - # instance type, persistent storage, container image defining environment, - # which IDE or Code Editor to use, and more. Administrators and platform teams - # can also use [Identity and Access Management - # (IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to - # teams or to individual developers. - # @!attribute [rw] name - # @return [::String] - # Full name of this workstation configuration. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human-readable name for this workstation configuration. - # @!attribute [r] uid - # @return [::String] - # Output only. A system-assigned unique identifier for this workstation - # configuration. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Indicates whether this workstation configuration is currently - # being updated to match its intended state. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client-specified annotations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. - # [Labels](https://cloud.google.com/workstations/docs/label-resources) that - # are applied to the workstation configuration and that are also propagated - # to the underlying Compute Engine resources. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation configuration was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation configuration was most recently - # updated. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation configuration was soft-deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. Checksum computed by the server. May be sent on update and delete - # requests to make sure that the client has an up-to-date value before - # proceeding. - # @!attribute [rw] idle_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds to wait before automatically stopping a - # workstation after it last received user traffic. - # - # A value of `"0s"` indicates that Cloud Workstations VMs created with this - # configuration should never time out due to idleness. - # Provide - # [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) - # terminated by `s` for seconds—for example, `"7200s"` (2 hours). - # The default is `"1200s"` (20 minutes). - # @!attribute [rw] running_timeout - # @return [::Google::Protobuf::Duration] - # Optional. Number of seconds that a workstation can run until it is - # automatically shut down. We recommend that workstations be shut down daily - # to reduce costs and so that security updates can be applied upon restart. - # The - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#idle_timeout idle_timeout} - # and - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#running_timeout running_timeout} - # fields are independent of each other. Note that the - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#running_timeout running_timeout} - # field shuts down VMs after the specified time, regardless of whether or not - # the VMs are idle. - # - # Provide duration terminated by `s` for seconds—for example, `"54000s"` - # (15 hours). Defaults to `"43200s"` (12 hours). A value of `"0s"` indicates - # that workstations using this configuration should never time out. If - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#encryption_key encryption_key} - # is set, it must be greater than `"0s"` and less than - # `"86400s"` (24 hours). - # - # Warning: A value of `"0s"` indicates that Cloud Workstations VMs created - # with this configuration have no maximum running time. This is strongly - # discouraged because you incur costs and will not pick up security updates. - # @!attribute [rw] host - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host] - # Optional. Runtime host for the workstation. - # @!attribute [rw] persistent_directories - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory>] - # Optional. Directories to persist across workstation sessions. - # @!attribute [rw] ephemeral_directories - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory>] - # Optional. Ephemeral directories which won't persist across workstation - # sessions. - # @!attribute [rw] container - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Container] - # Optional. Container that runs upon startup for each workstation using this - # workstation configuration. - # @!attribute [rw] encryption_key - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::CustomerEncryptionKey] - # Immutable. Encrypts resources of this workstation configuration using a - # customer-managed encryption key (CMEK). - # - # If specified, the boot disk of the Compute Engine instance and the - # persistent disk are encrypted using this encryption key. If - # this field is not set, the disks are encrypted using a generated - # key. Customer-managed encryption keys do not protect disk metadata. - # - # If the customer-managed encryption key is rotated, when the workstation - # instance is stopped, the system attempts to recreate the - # persistent disk with the new version of the key. Be sure to keep - # older versions of the key until the persistent disk is recreated. - # Otherwise, data on the persistent disk might be lost. - # - # If the encryption key is revoked, the workstation session automatically - # stops within 7 hours. - # - # Immutable after the workstation configuration is created. - # @!attribute [rw] readiness_checks - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::ReadinessCheck>] - # Optional. Readiness checks to perform when starting a workstation using - # this workstation configuration. Mark a workstation as running only after - # all specified readiness checks return 200 status codes. - # @!attribute [rw] replica_zones - # @return [::Array<::String>] - # Optional. Immutable. Specifies the zones used to replicate the VM and disk - # resources within the region. If set, exactly two zones within the - # workstation cluster's region must be specified—for example, - # `['us-central1-a', 'us-central1-f']`. If this field is empty, two default - # zones within the region are used. - # - # Immutable after the workstation configuration is created. - # @!attribute [r] degraded - # @return [::Boolean] - # Output only. Whether this resource is degraded, in which case it may - # require user action to restore full functionality. See also the - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#conditions conditions} - # field. - # @!attribute [r] conditions - # @return [::Array<::Google::Rpc::Status>] - # Output only. Status conditions describing the current resource state. - # @!attribute [rw] enable_audit_agent - # @return [::Boolean] - # Optional. Whether to enable Linux `auditd` logging on the workstation. When - # enabled, a service account must also be specified that has - # `logging.buckets.write` permission on the project. Operating system audit - # logging is distinct from [Cloud Audit - # Logs](https://cloud.google.com/workstations/docs/audit-logging). - class WorkstationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Runtime host for a workstation. - # @!attribute [rw] gce_instance - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance] - # Specifies a Compute Engine instance as the host. - class Host - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A runtime using a Compute Engine instance. - # @!attribute [rw] machine_type - # @return [::String] - # Optional. The type of machine to use for VM instances—for example, - # `"e2-standard-4"`. For more information about machine types that - # Cloud Workstations supports, see the list of - # [available machine - # types](https://cloud.google.com/workstations/docs/available-machine-types). - # @!attribute [rw] service_account - # @return [::String] - # Optional. The email address of the service account for Cloud - # Workstations VMs created with this configuration. When specified, be - # sure that the service account has `logginglogEntries.create` permission - # on the project so it can write logs out to Cloud Logging. If using a - # custom container image, the service account must have permissions to - # pull the specified image. - # - # If you as the administrator want to be able to `ssh` into the - # underlying VM, you need to set this value to a service account - # for which you have the `iam.serviceAccounts.actAs` permission. - # Conversely, if you don't want anyone to be able to `ssh` into the - # underlying VM, use a service account where no one has that - # permission. - # - # If not set, VMs run with a service account provided by the - # Cloud Workstations service, and the image must be publicly - # accessible. - # @!attribute [rw] service_account_scopes - # @return [::Array<::String>] - # Optional. Scopes to grant to the - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance#service_account service_account}. - # Various scopes are automatically added based on feature usage. When - # specified, users of workstations under this configuration must have - # `iam.serviceAccounts.actAs` on the service account. - # @!attribute [rw] tags - # @return [::Array<::String>] - # Optional. Network tags to add to the Compute Engine VMs backing the - # workstations. This option applies - # [network - # tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs - # created with this configuration. These network tags enable the creation - # of [firewall - # rules](https://cloud.google.com/workstations/docs/configure-firewall-rules). - # @!attribute [rw] pool_size - # @return [::Integer] - # Optional. The number of VMs that the system should keep idle so that - # new workstations can be started quickly for new users. Defaults to `0` - # in the API. - # @!attribute [r] pooled_instances - # @return [::Integer] - # Output only. Number of instances currently available in the pool for - # faster workstation startup. - # @!attribute [rw] disable_public_ip_addresses - # @return [::Boolean] - # Optional. When set to true, disables public IP addresses for VMs. If - # you disable public IP addresses, you must set up Private Google Access - # or Cloud NAT on your network. If you use Private Google Access and you - # use `private.googleapis.com` or `restricted.googleapis.com` for - # Container Registry and Artifact Registry, make sure that you set - # up DNS records for domains `*.gcr.io` and `*.pkg.dev`. - # Defaults to false (VMs have public IP addresses). - # @!attribute [rw] enable_nested_virtualization - # @return [::Boolean] - # Optional. Whether to enable nested virtualization on Cloud Workstations - # VMs created under this workstation configuration. - # - # Nested virtualization lets you run virtual machine (VM) instances - # inside your workstation. Before enabling nested virtualization, - # consider the following important considerations. Cloud Workstations - # instances are subject to the [same restrictions as Compute Engine - # instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): - # - # * **Organization policy**: projects, folders, or - # organizations may be restricted from creating nested VMs if the - # **Disable VM nested virtualization** constraint is enforced in - # the organization policy. For more information, see the - # Compute Engine section, - # [Checking whether nested virtualization is - # allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). - # * **Performance**: nested VMs might experience a 10% or greater - # decrease in performance for workloads that are CPU-bound and - # possibly greater than a 10% decrease for workloads that are - # input/output bound. - # * **Machine Type**: nested virtualization can only be enabled on - # workstation configurations that specify a - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance#machine_type machine_type} - # in the N1 or N2 machine series. - # * **GPUs**: nested virtualization may not be enabled on workstation - # configurations with accelerators. - # * **Operating System**: Because - # [Container-Optimized - # OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) - # does not support nested virtualization, when nested virtualization is - # enabled, the underlying Compute Engine VM instances boot from an - # [Ubuntu - # LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) - # image. - # @!attribute [rw] shielded_instance_config - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::GceShieldedInstanceConfig] - # Optional. A set of Compute Engine Shielded instance options. - # @!attribute [rw] confidential_instance_config - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::GceConfidentialInstanceConfig] - # Optional. A set of Compute Engine Confidential VM instance options. - # @!attribute [rw] boot_disk_size_gb - # @return [::Integer] - # Optional. The size of the boot disk for the VM in gigabytes (GB). - # The minimum boot disk size is `30` GB. Defaults to `50` GB. - # @!attribute [rw] accelerators - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig::Host::GceInstance::Accelerator>] - # Optional. A list of the type and count of accelerator cards attached to - # the instance. - class GceInstance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A set of Compute Engine Shielded instance options. - # @!attribute [rw] enable_secure_boot - # @return [::Boolean] - # Optional. Whether the instance has Secure Boot enabled. - # @!attribute [rw] enable_vtpm - # @return [::Boolean] - # Optional. Whether the instance has the vTPM enabled. - # @!attribute [rw] enable_integrity_monitoring - # @return [::Boolean] - # Optional. Whether the instance has integrity monitoring enabled. - class GceShieldedInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A set of Compute Engine Confidential VM instance options. - # @!attribute [rw] enable_confidential_compute - # @return [::Boolean] - # Optional. Whether the instance has confidential compute enabled. - class GceConfidentialInstanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # An accelerator card attached to the instance. - # @!attribute [rw] type - # @return [::String] - # Optional. Type of accelerator resource to attach to the instance, for - # example, - # `"nvidia-tesla-p100"`. - # @!attribute [rw] count - # @return [::Integer] - # Optional. Number of accelerator cards exposed to the instance. - class Accelerator - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # A directory to persist across workstation sessions. - # @!attribute [rw] gce_pd - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk] - # A PersistentDirectory backed by a Compute Engine persistent disk. - # @!attribute [rw] mount_path - # @return [::String] - # Optional. Location of this directory in the running workstation. - class PersistentDirectory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A PersistentDirectory backed by a Compute Engine regional persistent - # disk. The - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig#persistent_directories persistent_directories} - # field is repeated, but it may contain only one entry. It creates a - # [persistent - # disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that - # mounts to the workstation VM at `/home` when the session starts and - # detaches when the session ends. If this field is empty, workstations - # created with this configuration do not have a persistent home - # directory. - # @!attribute [rw] size_gb - # @return [::Integer] - # Optional. The GB capacity of a persistent home directory for each - # workstation created with this configuration. Must be empty if - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot source_snapshot} - # is set. - # - # Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. - # Defaults to `200`. If less than `200` GB, the - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#disk_type disk_type} - # must be - # `"pd-balanced"` or `"pd-ssd"`. - # @!attribute [rw] fs_type - # @return [::String] - # Optional. Type of file system that the disk should be formatted with. - # The workstation image must support this file system type. Must be empty - # if - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#source_snapshot source_snapshot} - # is set. Defaults to `"ext4"`. - # @!attribute [rw] disk_type - # @return [::String] - # Optional. The [type of the persistent - # disk](https://cloud.google.com/compute/docs/disks#disk-types) for the - # home directory. Defaults to `"pd-standard"`. - # @!attribute [rw] source_snapshot - # @return [::String] - # Optional. Name of the snapshot to use as the source for the disk. If - # set, - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#size_gb size_gb} - # and - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk#fs_type fs_type} - # must be empty. - # @!attribute [rw] reclaim_policy - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::PersistentDirectory::GceRegionalPersistentDisk::ReclaimPolicy] - # Optional. Whether the persistent disk should be deleted when the - # workstation is deleted. Valid values are `DELETE` and `RETAIN`. - # Defaults to `DELETE`. - class GceRegionalPersistentDisk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Value representing what should happen to the disk after the workstation - # is deleted. - module ReclaimPolicy - # Do not use. - RECLAIM_POLICY_UNSPECIFIED = 0 - - # Delete the persistent disk when deleting the workstation. - DELETE = 1 - - # Keep the persistent disk when deleting the workstation. - # An administrator must manually delete the disk. - RETAIN = 2 - end - end - end - - # An ephemeral directory which won't persist across workstation sessions. It - # is freshly created on every workstation start operation. - # @!attribute [rw] gce_pd - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk] - # An EphemeralDirectory backed by a Compute Engine persistent disk. - # @!attribute [rw] mount_path - # @return [::String] - # Required. Location of this directory in the running workstation. - class EphemeralDirectory - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An EphemeralDirectory is backed by a Compute Engine persistent disk. - # @!attribute [rw] disk_type - # @return [::String] - # Optional. Type of the disk to use. Defaults to `"pd-standard"`. - # @!attribute [rw] source_snapshot - # @return [::String] - # Optional. Name of the snapshot to use as the source for the disk. Must - # be empty if - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} - # is set. Updating - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} - # will update content in the ephemeral directory after the workstation is - # restarted. This field is mutable. - # @!attribute [rw] source_image - # @return [::String] - # Optional. Name of the disk image to use as the source for the disk. - # Must be empty if - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} - # is set. Updating - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_image source_image} - # will update content in the ephemeral directory after the workstation is - # restarted. This field is mutable. - # @!attribute [rw] read_only - # @return [::Boolean] - # Optional. Whether the disk is read only. If true, the disk may be - # shared by multiple VMs and - # {::Google::Cloud::Workstations::V1beta::WorkstationConfig::EphemeralDirectory::GcePersistentDisk#source_snapshot source_snapshot} - # must be set. - class GcePersistentDisk - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A Docker container. - # @!attribute [rw] image - # @return [::String] - # Optional. A Docker container image that defines a custom environment. - # - # Cloud Workstations provides a number of - # [preconfigured - # images](https://cloud.google.com/workstations/docs/preconfigured-base-images), - # but you can create your own - # [custom container - # images](https://cloud.google.com/workstations/docs/custom-container-images). - # If using a private image, the `host.gceInstance.serviceAccount` field - # must be specified in the workstation configuration and must have - # permission to pull the specified image. Otherwise, the image must be - # publicly accessible. - # @!attribute [rw] command - # @return [::Array<::String>] - # Optional. If set, overrides the default ENTRYPOINT specified by the - # image. - # @!attribute [rw] args - # @return [::Array<::String>] - # Optional. Arguments passed to the entrypoint. - # @!attribute [rw] env - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Environment variables passed to the container's entrypoint. - # @!attribute [rw] working_dir - # @return [::String] - # Optional. If set, overrides the default DIR specified by the image. - # @!attribute [rw] run_as_user - # @return [::Integer] - # Optional. If set, overrides the USER specified in the image with the - # given uid. - class Container - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class EnvEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A customer-managed encryption key (CMEK) for the Compute Engine - # resources of the associated workstation configuration. Specify the name of - # your Cloud KMS encryption key and the default service account. - # We recommend that you use a separate service account and follow - # [Cloud KMS best - # practices](https://cloud.google.com/kms/docs/separation-of-duties). - # @!attribute [rw] kms_key - # @return [::String] - # Immutable. The name of the Google Cloud KMS encryption key. For example, - # `"projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME"`. - # The key must be in the same region as the workstation configuration. - # @!attribute [rw] kms_key_service_account - # @return [::String] - # Immutable. The service account to use with the specified - # KMS key. We recommend that you use a separate service account - # and follow KMS best practices. For more information, see - # [Separation of - # duties](https://cloud.google.com/kms/docs/separation-of-duties) and - # `gcloud kms keys add-iam-policy-binding` - # [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member). - class CustomerEncryptionKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A readiness check to be performed on a workstation. - # @!attribute [rw] path - # @return [::String] - # Optional. Path to which the request should be sent. - # @!attribute [rw] port - # @return [::Integer] - # Optional. Port to which the request should be sent. - class ReadinessCheck - 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 - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class LabelsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A single instance of a developer workstation with its own persistent storage. - # @!attribute [rw] name - # @return [::String] - # Full name of this workstation. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human-readable name for this workstation. - # @!attribute [r] uid - # @return [::String] - # Output only. A system-assigned unique identifier for this workstation. - # @!attribute [r] reconciling - # @return [::Boolean] - # Output only. Indicates whether this workstation is currently being updated - # to match its intended state. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Client-specified annotations. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. - # [Labels](https://cloud.google.com/workstations/docs/label-resources) that - # are applied to the workstation and that are also propagated to the - # underlying Compute Engine resources. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation was most recently updated. - # @!attribute [r] start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation was most recently successfully - # started, regardless of the workstation's initial state. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this workstation was soft-deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. Checksum computed by the server. May be sent on update and delete - # requests to make sure that the client has an up-to-date value before - # proceeding. - # @!attribute [r] state - # @return [::Google::Cloud::Workstations::V1beta::Workstation::State] - # Output only. Current state of the workstation. - # @!attribute [r] host - # @return [::String] - # Output only. Host to which clients can send HTTPS traffic that will be - # received by the workstation. Authorized traffic will be received to the - # workstation as HTTP on port 80. To send traffic to a different port, - # clients may prefix the host with the destination port in the format - # `{port}-{host}`. - # @!attribute [rw] env - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Environment variables passed to the workstation container's - # entrypoint. - class Workstation - 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 - - # @!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 EnvEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Whether a workstation is running and ready to receive user requests. - module State - # Do not use. - STATE_UNSPECIFIED = 0 - - # The workstation is not yet ready to accept requests from users but will - # be soon. - STATE_STARTING = 1 - - # The workstation is ready to accept requests from users. - STATE_RUNNING = 2 - - # The workstation is being stopped. - STATE_STOPPING = 3 - - # The workstation is stopped and will not be able to receive requests until - # it is started. - STATE_STOPPED = 4 - end - end - - # Request message for GetWorkstationCluster. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested resource. - class GetWorkstationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListWorkstationClusters. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListWorkstationClustersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListWorkstationClusters. - # @!attribute [rw] workstation_clusters - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationCluster>] - # The requested workstation clusters. - # @!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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. - class ListWorkstationClustersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a CreateWorkstationCluster. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] workstation_cluster_id - # @return [::String] - # Required. ID to use for the workstation cluster. - # @!attribute [rw] workstation_cluster - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] - # Required. Workstation cluster to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - class CreateWorkstationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateWorkstationCluster. - # @!attribute [rw] workstation_cluster - # @return [::Google::Cloud::Workstations::V1beta::WorkstationCluster] - # Required. Workstation cluster to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask that specifies which fields in the workstation cluster - # should be updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set, and the workstation cluster is not found, a new - # workstation cluster will be created. In this situation, update_mask is - # ignored. - class UpdateWorkstationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a workstation cluster. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation cluster to delete. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation cluster on the server does not have this ETag. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set, any workstation configurations and workstations in the - # workstation cluster are also deleted. Otherwise, the request only - # works if the workstation cluster has no configurations or workstations. - class DeleteWorkstationClusterRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetWorkstationConfig. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested resource. - class GetWorkstationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListWorkstationConfigs. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListWorkstationConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListWorkstationConfigs. - # @!attribute [rw] workstation_configs - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] - # The requested configs. - # @!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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. - class ListWorkstationConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListUsableWorkstationConfigs. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListUsableWorkstationConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListUsableWorkstationConfigs. - # @!attribute [rw] workstation_configs - # @return [::Array<::Google::Cloud::Workstations::V1beta::WorkstationConfig>] - # The requested configs. - # @!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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. - class ListUsableWorkstationConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a CreateWorkstationConfig. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] workstation_config_id - # @return [::String] - # Required. ID to use for the workstation configuration. - # @!attribute [rw] workstation_config - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] - # Required. Config to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - class CreateWorkstationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateWorkstationConfig. - # @!attribute [rw] workstation_config - # @return [::Google::Cloud::Workstations::V1beta::WorkstationConfig] - # Required. Config to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration will be created. In this situation, - # update_mask is ignored. - class UpdateWorkstationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for deleting a workstation configuration. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation configuration to delete. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request is rejected if the latest version of the - # workstation configuration on the server does not have this ETag. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set, any workstations in the workstation configuration are - # also deleted. Otherwise, the request works only if the workstation - # configuration has no workstations. - class DeleteWorkstationConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetWorkstation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the requested resource. - class GetWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListWorkstations. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListWorkstationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListWorkstations. - # @!attribute [rw] workstations - # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation>] - # The requested workstations. - # @!attribute [rw] next_page_token - # @return [::String] - # Optional. 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>] - # Optional. Unreachable resources. - class ListWorkstationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListUsableWorkstations. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # Optional. next_page_token value returned from a previous List request, if - # any. - class ListUsableWorkstationsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListUsableWorkstations. - # @!attribute [rw] workstations - # @return [::Array<::Google::Cloud::Workstations::V1beta::Workstation>] - # The requested workstations. - # @!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. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources. - class ListUsableWorkstationsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message for creating a CreateWorkstation. - # @!attribute [rw] parent - # @return [::String] - # Required. Parent resource name. - # @!attribute [rw] workstation_id - # @return [::String] - # Required. ID to use for the workstation. - # @!attribute [rw] workstation - # @return [::Google::Cloud::Workstations::V1beta::Workstation] - # Required. Workstation to create. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - class CreateWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateWorkstation. - # @!attribute [rw] workstation - # @return [::Google::Cloud::Workstations::V1beta::Workstation] - # Required. Workstation to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask specifying which fields in the workstation configuration - # should be updated. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set and the workstation configuration is not found, a new - # workstation configuration is created. In this situation, update_mask - # is ignored. - class UpdateWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteWorkstation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation to delete. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - class DeleteWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for StartWorkstation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation to start. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - class StartWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for StopWorkstation. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the workstation to stop. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # actually apply it. - # @!attribute [rw] etag - # @return [::String] - # Optional. If set, the request will be rejected if the latest version of the - # workstation on the server does not have this ETag. - class StopWorkstationRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GenerateAccessToken. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Desired expiration time of the access token. This value must - # be at most 24 hours in the future. If a value is not specified, the - # token's expiration time will be set to a default value of 1 hour in the - # future. - # - # Note: The following fields are mutually exclusive: `expire_time`, `ttl`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ttl - # @return [::Google::Protobuf::Duration] - # Desired lifetime duration of the access token. This value must - # be at most 24 hours. If a value is not specified, the token's lifetime - # will be set to a default value of 1 hour. - # - # Note: The following fields are mutually exclusive: `ttl`, `expire_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] workstation - # @return [::String] - # Required. Name of the workstation for which the access token should be - # generated. - class GenerateAccessTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for GenerateAccessToken. - # @!attribute [rw] access_token - # @return [::String] - # The generated bearer access token. To use this token, include it in an - # Authorization header of an HTTP request sent to the associated - # workstation's hostname—for example, `Authorization: Bearer - # `. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Time at which the generated token will expire. - class GenerateAccessTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for long-running operations. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time that the operation was created. - # @!attribute [r] end_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time that 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. - # @!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-workstations-v1beta/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/field_mask.rb +++ /dev/null @@ -1,229 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # `FieldMask` represents a set of symbolic field paths, for example: - # - # paths: "f.a" - # paths: "f.b.d" - # - # Here `f` represents a field in some root message, `a` and `b` - # fields in the message found in `f`, and `d` a field found in the - # message in `f.b`. - # - # Field masks are used to specify a subset of fields that should be - # returned by a get operation or modified by an update operation. - # Field masks also have a custom JSON encoding (see below). - # - # # Field Masks in Projections - # - # When used in the context of a projection, a response message or - # sub-message is filtered by the API to only contain those fields as - # specified in the mask. For example, if the mask in the previous - # example is applied to a response message as follows: - # - # f { - # a : 22 - # b { - # d : 1 - # x : 2 - # } - # y : 13 - # } - # z: 8 - # - # The result will not contain specific values for fields x,y and z - # (their value will be set to the default, and omitted in proto text - # output): - # - # - # f { - # a : 22 - # b { - # d : 1 - # } - # } - # - # A repeated field is not allowed except at the last position of a - # paths string. - # - # If a FieldMask object is not present in a get operation, the - # operation applies to all fields (as if a FieldMask of all fields - # had been specified). - # - # Note that a field mask does not necessarily apply to the - # top-level response message. In case of a REST get operation, the - # field mask applies directly to the response, but in case of a REST - # list operation, the mask instead applies to each individual message - # in the returned resource list. In case of a REST custom method, - # other definitions may be used. Where the mask applies will be - # clearly documented together with its declaration in the API. In - # any case, the effect on the returned resource/resources is required - # behavior for APIs. - # - # # Field Masks in Update Operations - # - # A field mask in update operations specifies which fields of the - # targeted resource are going to be updated. The API is required - # to only change the values of the fields as specified in the mask - # and leave the others untouched. If a resource is passed in to - # describe the updated values, the API ignores the values of all - # fields not covered by the mask. - # - # If a repeated field is specified for an update operation, new values will - # be appended to the existing repeated field in the target resource. Note that - # a repeated field is only allowed in the last position of a `paths` string. - # - # If a sub-message is specified in the last position of the field mask for an - # update operation, then new value will be merged into the existing sub-message - # in the target resource. - # - # For example, given the target message: - # - # f { - # b { - # d: 1 - # x: 2 - # } - # c: [1] - # } - # - # And an update message: - # - # f { - # b { - # d: 10 - # } - # c: [2] - # } - # - # then if the field mask is: - # - # paths: ["f.b", "f.c"] - # - # then the result will be: - # - # f { - # b { - # d: 10 - # x: 2 - # } - # c: [1, 2] - # } - # - # An implementation may provide options to override this default behavior for - # repeated and message fields. - # - # In order to reset a field's value to the default, the field must - # be in the mask and set to the default value in the provided resource. - # Hence, in order to reset all fields of a resource, provide a default - # instance of the resource and set all fields in the mask, or do - # not provide a mask as described below. - # - # If a field mask is not present on update, the operation applies to - # all fields (as if a field mask of all fields has been specified). - # Note that in the presence of schema evolution, this may mean that - # fields the client does not know and has therefore not filled into - # the request will be reset to their default. If this is unwanted - # behavior, a specific service may require a client to always specify - # a field mask, producing an error if not. - # - # As with get operations, the location of the resource which - # describes the updated values in the request message depends on the - # operation kind. In any case, the effect of the field mask is - # required to be honored by the API. - # - # ## Considerations for HTTP REST - # - # The HTTP kind of an update operation which uses a field mask must - # be set to PATCH instead of PUT in order to satisfy HTTP semantics - # (PUT must only be used for full updates). - # - # # JSON Encoding of Field Masks - # - # In JSON, a field mask is encoded as a single string where paths are - # separated by a comma. Fields name in each path are converted - # to/from lower-camel naming conventions. - # - # As an example, consider the following message declarations: - # - # message Profile { - # User user = 1; - # Photo photo = 2; - # } - # message User { - # string display_name = 1; - # string address = 2; - # } - # - # In proto a field mask for `Profile` may look as such: - # - # mask { - # paths: "user.display_name" - # paths: "photo" - # } - # - # In JSON, the same mask is represented as below: - # - # { - # mask: "user.displayName,photo" - # } - # - # # Field Masks and Oneof Fields - # - # Field masks treat fields in oneofs just as regular fields. Consider the - # following message: - # - # message SampleMessage { - # oneof test_oneof { - # string name = 4; - # SubMessage sub_message = 9; - # } - # } - # - # The field mask can be: - # - # mask { - # paths: "name" - # } - # - # Or: - # - # mask { - # paths: "sub_message" - # } - # - # Note that oneof type names ("test_oneof" in this case) cannot be used in - # paths. - # - # ## Field Mask Verification - # - # The implementation of any API method which has a FieldMask type field in the - # request should verify the included field paths, and return an - # `INVALID_ARGUMENT` error if any path is unmappable. - # @!attribute [rw] paths - # @return [::Array<::String>] - # The set of field mask paths. - class FieldMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-workstations-v1beta/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/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-workstations-v1beta/snippets/Gemfile b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/Gemfile deleted file mode 100644 index 7a19ba50a0c6..000000000000 --- a/owl-bot-staging/google-cloud-workstations-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-workstations-v1beta", path: "../" -else - gem "google-cloud-workstations-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-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json deleted file mode 100644 index 46f10e2bfde3..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/snippet_metadata_google.cloud.workstations.v1beta.json +++ /dev/null @@ -1,815 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-workstations-v1beta", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.workstations.v1beta", - "version": "v1beta" - } - ] - }, - "snippets": [ - { - "region_tag": "workstations_v1beta_generated_Workstations_GetWorkstationCluster_sync", - "title": "Snippet for the get_workstation_cluster call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_cluster.", - "file": "workstations/get_workstation_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workstation_cluster", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1beta::WorkstationCluster", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "GetWorkstationCluster", - "full_name": "google.cloud.workstations.v1beta.Workstations.GetWorkstationCluster", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_ListWorkstationClusters_sync", - "title": "Snippet for the list_workstation_clusters call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_clusters.", - "file": "workstations/list_workstation_clusters.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workstation_clusters", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_clusters", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "ListWorkstationClusters", - "full_name": "google.cloud.workstations.v1beta.Workstations.ListWorkstationClusters", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_CreateWorkstationCluster_sync", - "title": "Snippet for the create_workstation_cluster call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_cluster.", - "file": "workstations/create_workstation_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workstation_cluster", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "CreateWorkstationCluster", - "full_name": "google.cloud.workstations.v1beta.Workstations.CreateWorkstationCluster", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_UpdateWorkstationCluster_sync", - "title": "Snippet for the update_workstation_cluster call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_cluster.", - "file": "workstations/update_workstation_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workstation_cluster", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "UpdateWorkstationCluster", - "full_name": "google.cloud.workstations.v1beta.Workstations.UpdateWorkstationCluster", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_DeleteWorkstationCluster_sync", - "title": "Snippet for the delete_workstation_cluster call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_cluster.", - "file": "workstations/delete_workstation_cluster.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workstation_cluster", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_cluster", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "DeleteWorkstationCluster", - "full_name": "google.cloud.workstations.v1beta.Workstations.DeleteWorkstationCluster", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_GetWorkstationConfig_sync", - "title": "Snippet for the get_workstation_config call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_config.", - "file": "workstations/get_workstation_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workstation_config", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1beta::WorkstationConfig", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "GetWorkstationConfig", - "full_name": "google.cloud.workstations.v1beta.Workstations.GetWorkstationConfig", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_ListWorkstationConfigs_sync", - "title": "Snippet for the list_workstation_configs call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_configs.", - "file": "workstations/list_workstation_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workstation_configs", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "ListWorkstationConfigs", - "full_name": "google.cloud.workstations.v1beta.Workstations.ListWorkstationConfigs", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_ListUsableWorkstationConfigs_sync", - "title": "Snippet for the list_usable_workstation_configs call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstation_configs.", - "file": "workstations/list_usable_workstation_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_usable_workstation_configs", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstation_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "ListUsableWorkstationConfigs", - "full_name": "google.cloud.workstations.v1beta.Workstations.ListUsableWorkstationConfigs", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_CreateWorkstationConfig_sync", - "title": "Snippet for the create_workstation_config call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_config.", - "file": "workstations/create_workstation_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workstation_config", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "CreateWorkstationConfig", - "full_name": "google.cloud.workstations.v1beta.Workstations.CreateWorkstationConfig", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_UpdateWorkstationConfig_sync", - "title": "Snippet for the update_workstation_config call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_config.", - "file": "workstations/update_workstation_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workstation_config", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "UpdateWorkstationConfig", - "full_name": "google.cloud.workstations.v1beta.Workstations.UpdateWorkstationConfig", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_DeleteWorkstationConfig_sync", - "title": "Snippet for the delete_workstation_config call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_config.", - "file": "workstations/delete_workstation_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workstation_config", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "DeleteWorkstationConfig", - "full_name": "google.cloud.workstations.v1beta.Workstations.DeleteWorkstationConfig", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_GetWorkstation_sync", - "title": "Snippet for the get_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation.", - "file": "workstations/get_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_workstation", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::GetWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1beta::Workstation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "GetWorkstation", - "full_name": "google.cloud.workstations.v1beta.Workstations.GetWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_ListWorkstations_sync", - "title": "Snippet for the list_workstations call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstations.", - "file": "workstations/list_workstations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_workstations", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "ListWorkstations", - "full_name": "google.cloud.workstations.v1beta.Workstations.ListWorkstations", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_ListUsableWorkstations_sync", - "title": "Snippet for the list_usable_workstations call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstations.", - "file": "workstations/list_usable_workstations.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_usable_workstations", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstations", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "ListUsableWorkstations", - "full_name": "google.cloud.workstations.v1beta.Workstations.ListUsableWorkstations", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_CreateWorkstation_sync", - "title": "Snippet for the create_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation.", - "file": "workstations/create_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_workstation", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "CreateWorkstation", - "full_name": "google.cloud.workstations.v1beta.Workstations.CreateWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_UpdateWorkstation_sync", - "title": "Snippet for the update_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation.", - "file": "workstations/update_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_workstation", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "UpdateWorkstation", - "full_name": "google.cloud.workstations.v1beta.Workstations.UpdateWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_DeleteWorkstation_sync", - "title": "Snippet for the delete_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation.", - "file": "workstations/delete_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_workstation", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "DeleteWorkstation", - "full_name": "google.cloud.workstations.v1beta.Workstations.DeleteWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_StartWorkstation_sync", - "title": "Snippet for the start_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#start_workstation.", - "file": "workstations/start_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "start_workstation", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#start_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::StartWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "StartWorkstation", - "full_name": "google.cloud.workstations.v1beta.Workstations.StartWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_StopWorkstation_sync", - "title": "Snippet for the stop_workstation call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#stop_workstation.", - "file": "workstations/stop_workstation.rb", - "language": "RUBY", - "client_method": { - "short_name": "stop_workstation", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#stop_workstation", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::StopWorkstationRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "StopWorkstation", - "full_name": "google.cloud.workstations.v1beta.Workstations.StopWorkstation", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "workstations_v1beta_generated_Workstations_GenerateAccessToken_sync", - "title": "Snippet for the generate_access_token call in the Workstations service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Workstations::V1beta::Workstations::Client#generate_access_token.", - "file": "workstations/generate_access_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_access_token", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client#generate_access_token", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse", - "client": { - "short_name": "Workstations::Client", - "full_name": "::Google::Cloud::Workstations::V1beta::Workstations::Client" - }, - "method": { - "short_name": "GenerateAccessToken", - "full_name": "google.cloud.workstations.v1beta.Workstations.GenerateAccessToken", - "service": { - "short_name": "Workstations", - "full_name": "google.cloud.workstations.v1beta.Workstations" - } - } - }, - "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-workstations-v1beta/snippets/workstations/create_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.rb deleted file mode 100644 index d693d2b46ae5..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation.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 workstations_v1beta_generated_Workstations_CreateWorkstation_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the create_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation. -# -def create_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new - - # Call the create_workstation method. - result = client.create_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_CreateWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.rb deleted file mode 100644 index 87128b5c9ea7..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_cluster.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 workstations_v1beta_generated_Workstations_CreateWorkstationCluster_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the create_workstation_cluster call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_cluster. -# -def create_workstation_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new - - # Call the create_workstation_cluster method. - result = client.create_workstation_cluster request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_CreateWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb deleted file mode 100644 index f2b1d8cd72ce..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/create_workstation_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_CreateWorkstationConfig_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the create_workstation_config call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#create_workstation_config. -# -def create_workstation_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new - - # Call the create_workstation_config method. - result = client.create_workstation_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_CreateWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.rb deleted file mode 100644 index 5077d7921393..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation.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 workstations_v1beta_generated_Workstations_DeleteWorkstation_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the delete_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation. -# -def delete_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new - - # Call the delete_workstation method. - result = client.delete_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_DeleteWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.rb deleted file mode 100644 index 102ab70aae42..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_cluster.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 workstations_v1beta_generated_Workstations_DeleteWorkstationCluster_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the delete_workstation_cluster call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_cluster. -# -def delete_workstation_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new - - # Call the delete_workstation_cluster method. - result = client.delete_workstation_cluster request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_DeleteWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb deleted file mode 100644 index 9ad29224664b..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/delete_workstation_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_DeleteWorkstationConfig_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the delete_workstation_config call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#delete_workstation_config. -# -def delete_workstation_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new - - # Call the delete_workstation_config method. - result = client.delete_workstation_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_DeleteWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb deleted file mode 100644 index c810256cd2e2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/generate_access_token.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_GenerateAccessToken_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the generate_access_token call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#generate_access_token. -# -def generate_access_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new - - # Call the generate_access_token method. - result = client.generate_access_token request - - # The returned object is of type Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse. - p result -end -# [END workstations_v1beta_generated_Workstations_GenerateAccessToken_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb deleted file mode 100644 index ed645c9c161d..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_GetWorkstation_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the get_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation. -# -def get_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new - - # Call the get_workstation method. - result = client.get_workstation request - - # The returned object is of type Google::Cloud::Workstations::V1beta::Workstation. - p result -end -# [END workstations_v1beta_generated_Workstations_GetWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb deleted file mode 100644 index 665a6a0fe884..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_cluster.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_GetWorkstationCluster_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the get_workstation_cluster call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_cluster. -# -def get_workstation_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new - - # Call the get_workstation_cluster method. - result = client.get_workstation_cluster request - - # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationCluster. - p result -end -# [END workstations_v1beta_generated_Workstations_GetWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_config.rb deleted file mode 100644 index df2764fba5d2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/get_workstation_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 workstations_v1beta_generated_Workstations_GetWorkstationConfig_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the get_workstation_config call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#get_workstation_config. -# -def get_workstation_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new - - # Call the get_workstation_config method. - result = client.get_workstation_config request - - # The returned object is of type Google::Cloud::Workstations::V1beta::WorkstationConfig. - p result -end -# [END workstations_v1beta_generated_Workstations_GetWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_configs.rb deleted file mode 100644 index 04c759f7d070..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstation_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 workstations_v1beta_generated_Workstations_ListUsableWorkstationConfigs_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the list_usable_workstation_configs call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstation_configs. -# -def list_usable_workstation_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new - - # Call the list_usable_workstation_configs method. - result = client.list_usable_workstation_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::Workstations::V1beta::WorkstationConfig. - p item - end -end -# [END workstations_v1beta_generated_Workstations_ListUsableWorkstationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb deleted file mode 100644 index ac98db348987..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_usable_workstations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_ListUsableWorkstations_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the list_usable_workstations call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#list_usable_workstations. -# -def list_usable_workstations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new - - # Call the list_usable_workstations method. - result = client.list_usable_workstations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. - p item - end -end -# [END workstations_v1beta_generated_Workstations_ListUsableWorkstations_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb deleted file mode 100644 index 339e219b560c..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_clusters.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_ListWorkstationClusters_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the list_workstation_clusters call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_clusters. -# -def list_workstation_clusters - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new - - # Call the list_workstation_clusters method. - result = client.list_workstation_clusters request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Workstations::V1beta::WorkstationCluster. - p item - end -end -# [END workstations_v1beta_generated_Workstations_ListWorkstationClusters_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_configs.rb deleted file mode 100644 index e048457320f7..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstation_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 workstations_v1beta_generated_Workstations_ListWorkstationConfigs_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the list_workstation_configs call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstation_configs. -# -def list_workstation_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new - - # Call the list_workstation_configs method. - result = client.list_workstation_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::Workstations::V1beta::WorkstationConfig. - p item - end -end -# [END workstations_v1beta_generated_Workstations_ListWorkstationConfigs_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb deleted file mode 100644 index cdea490fd7b3..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/list_workstations.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_ListWorkstations_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the list_workstations call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#list_workstations. -# -def list_workstations - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new - - # Call the list_workstations method. - result = client.list_workstations request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Workstations::V1beta::Workstation. - p item - end -end -# [END workstations_v1beta_generated_Workstations_ListWorkstations_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.rb deleted file mode 100644 index 4d0f92d6a22b..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/start_workstation.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 workstations_v1beta_generated_Workstations_StartWorkstation_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the start_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#start_workstation. -# -def start_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new - - # Call the start_workstation method. - result = client.start_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_StartWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.rb deleted file mode 100644 index 81426cbc8008..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/stop_workstation.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 workstations_v1beta_generated_Workstations_StopWorkstation_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the stop_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#stop_workstation. -# -def stop_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new - - # Call the stop_workstation method. - result = client.stop_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_StopWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.rb deleted file mode 100644 index 5f5722b2f007..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation.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 workstations_v1beta_generated_Workstations_UpdateWorkstation_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the update_workstation call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation. -# -def update_workstation - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new - - # Call the update_workstation method. - result = client.update_workstation request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_UpdateWorkstation_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.rb deleted file mode 100644 index 9890ea125115..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_cluster.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 workstations_v1beta_generated_Workstations_UpdateWorkstationCluster_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the update_workstation_cluster call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_cluster. -# -def update_workstation_cluster - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new - - # Call the update_workstation_cluster method. - result = client.update_workstation_cluster request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_UpdateWorkstationCluster_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb b/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb deleted file mode 100644 index 659a518628ac..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/snippets/workstations/update_workstation_config.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START workstations_v1beta_generated_Workstations_UpdateWorkstationConfig_sync] -require "google/cloud/workstations/v1beta" - -## -# Snippet for the update_workstation_config call in the Workstations service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Workstations::V1beta::Workstations::Client#update_workstation_config. -# -def update_workstation_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Workstations::V1beta::Workstations::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new - - # Call the update_workstation_config method. - result = client.update_workstation_config request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is how to wait for a response. - result.wait_until_done! timeout: 60 - if result.response? - p result.response - else - puts "No response received." - end -end -# [END workstations_v1beta_generated_Workstations_UpdateWorkstationConfig_sync] diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_operations_test.rb deleted file mode 100644 index 15f8d121ef95..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_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/workstations/v1beta/workstations_pb" -require "google/cloud/workstations/v1beta/workstations_services_pb" -require "google/cloud/workstations/v1beta/workstations" - -class ::Google::Cloud::Workstations::V1beta::Workstations::OperationsTest < Minitest::Test - class ClientStub - attr_accessor :call_rpc_count, :requests - - def initialize response, operation, &block - @response = response - @operation = operation - @block = block - @call_rpc_count = 0 - @requests = [] - end - - def call_rpc *args, **kwargs - @call_rpc_count += 1 - - @requests << @block&.call(*args, **kwargs) - - catch :response do - yield @response, @operation if block_given? - @response - end - end - - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_list_operations - # Create GRPC objects. - grpc_response = ::Google::Longrunning::ListOperationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - filter = "hello world" - page_size = 42 - page_token = "hello world" - return_partial_success = true - - list_operations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_operations, name - assert_kind_of ::Google::Longrunning::ListOperationsRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["filter"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_operations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_operations name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_operations ::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_operations({ name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_operations(::Google::Longrunning::ListOperationsRequest.new(name: name, filter: filter, page_size: page_size, page_token: page_token, return_partial_success: return_partial_success), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_operations_client_stub.call_rpc_count - end - end - - def test_get_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_operation, name - assert_kind_of ::Google::Longrunning::GetOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_operation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_operation({ name: name }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_operation name: name do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_operation ::Google::Longrunning::GetOperationRequest.new(name: name) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_operation({ name: name }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_operation(::Google::Longrunning::GetOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_operation_client_stub.call_rpc_count - end - end - - def test_delete_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - delete_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_operation, name - assert_kind_of ::Google::Longrunning::DeleteOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_operation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_operation ::Google::Longrunning::DeleteOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_operation(::Google::Longrunning::DeleteOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_operation_client_stub.call_rpc_count - end - end - - def test_cancel_operation - # Create GRPC objects. - grpc_response = ::Google::Protobuf::Empty.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - cancel_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_operation, name - assert_kind_of ::Google::Longrunning::CancelOperationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_operation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_operation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_operation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_operation ::Google::Longrunning::CancelOperationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_operation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_operation(::Google::Longrunning::CancelOperationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_operation_client_stub.call_rpc_count - end - end - - def test_wait_operation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - timeout = {} - - wait_operation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :wait_operation, name - assert_kind_of ::Google::Longrunning::WaitOperationRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["timeout"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, wait_operation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Operations.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.wait_operation({ name: name, timeout: timeout }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.wait_operation name: name, timeout: timeout do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.wait_operation ::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.wait_operation({ name: name, timeout: timeout }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.wait_operation(::Google::Longrunning::WaitOperationRequest.new(name: name, timeout: timeout), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, wait_operation_client_stub.call_rpc_count - end - end - - def test_configure - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - - client = block_config = config = nil - dummy_stub = ClientStub.new nil, nil - Gapic::ServiceStub.stub :new, dummy_stub do - client = ::Google::Cloud::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_paths_test.rb deleted file mode 100644 index b909911491fb..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_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/workstations/v1beta/workstations" - -class ::Google::Cloud::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::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_workstation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workstation_path project: "value0", location: "value1", workstation_cluster: "value2", workstation_config: "value3", workstation: "value4" - assert_equal "projects/value0/locations/value1/workstationClusters/value2/workstationConfigs/value3/workstations/value4", path - end - end - - def test_workstation_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::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workstation_cluster_path project: "value0", location: "value1", workstation_cluster: "value2" - assert_equal "projects/value0/locations/value1/workstationClusters/value2", path - end - end - - def test_workstation_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::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workstation_config_path project: "value0", location: "value1", workstation_cluster: "value2", workstation_config: "value3" - assert_equal "projects/value0/locations/value1/workstationClusters/value2/workstationConfigs/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb deleted file mode 100644 index 4700ae680eee..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_rest_test.rb +++ /dev/null @@ -1,1220 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License 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/workstations/v1beta/workstations_pb" -require "google/cloud/workstations/v1beta/workstations/rest" - - -class ::Google::Cloud::Workstations::V1beta::Workstations::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_workstation_cluster - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1beta::WorkstationCluster.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workstation_cluster({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workstation_cluster name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workstation_cluster ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workstation_cluster({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workstation_cluster(::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workstation_cluster_client_stub.call_count - end - end - end - - def test_list_workstation_clusters - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse.new - http_response = OpenStruct.new 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_workstation_clusters_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_workstation_clusters_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workstation_clusters_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.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_workstation_clusters_client_stub.call_count - end - end - end - - def test_create_workstation_cluster - # Create test objects. - 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" - workstation_cluster_id = "hello world" - workstation_cluster = {} - validate_only = true - - create_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workstation_cluster parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workstation_cluster ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workstation_cluster(::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workstation_cluster_client_stub.call_count - end - end - end - - def test_update_workstation_cluster - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workstation_cluster = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workstation_cluster workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workstation_cluster ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workstation_cluster(::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workstation_cluster_client_stub.call_count - end - end - end - - def test_delete_workstation_cluster - # Create test objects. - 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" - validate_only = true - etag = "hello world" - force = true - - delete_workstation_cluster_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_cluster_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workstation_cluster name: name, validate_only: validate_only, etag: etag, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workstation_cluster ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workstation_cluster(::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workstation_cluster_client_stub.call_count - end - end - end - - def test_get_workstation_config - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1beta::WorkstationConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workstation_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workstation_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workstation_config ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workstation_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workstation_config(::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workstation_config_client_stub.call_count - end - end - end - - def test_list_workstation_configs - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse.new - http_response = OpenStruct.new 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_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_workstation_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workstation_configs_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.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_workstation_configs_client_stub.call_count - end - end - end - - def test_list_usable_workstation_configs - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse.new - http_response = OpenStruct.new 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_usable_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_usable_workstation_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_usable_workstation_configs_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_usable_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_usable_workstation_configs ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_usable_workstation_configs(::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.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_usable_workstation_configs_client_stub.call_count - end - end - end - - def test_create_workstation_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workstation_config_id = "hello world" - workstation_config = {} - validate_only = true - - create_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workstation_config parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workstation_config ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workstation_config(::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workstation_config_client_stub.call_count - end - end - end - - def test_update_workstation_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workstation_config = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workstation_config workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workstation_config ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workstation_config(::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workstation_config_client_stub.call_count - end - end - end - - def test_delete_workstation_config - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - force = true - - delete_workstation_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::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workstation_config name: name, validate_only: validate_only, etag: etag, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workstation_config ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workstation_config(::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workstation_config_client_stub.call_count - end - end - end - - def test_get_workstation - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1beta::Workstation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_get_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_workstation({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_workstation name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_workstation ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_workstation({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_workstation(::Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_workstation_client_stub.call_count - end - end - end - - def test_list_workstations - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse.new - http_response = OpenStruct.new 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_workstations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_workstations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_workstations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_workstations parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.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_workstations_client_stub.call_count - end - end - end - - def test_list_usable_workstations - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse.new - http_response = OpenStruct.new 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_usable_workstations_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_list_usable_workstations_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_usable_workstations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_usable_workstations parent: parent, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_usable_workstations ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_usable_workstations(::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.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_usable_workstations_client_stub.call_count - end - end - end - - def test_create_workstation - # Create test objects. - 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" - workstation_id = "hello world" - workstation = {} - validate_only = true - - create_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_create_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_workstation parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_workstation ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_workstation(::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_workstation_client_stub.call_count - end - end - end - - def test_update_workstation - # Create test objects. - client_result = ::Google::Longrunning::Operation.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - workstation = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_update_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_workstation({ workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_workstation workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_workstation ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_workstation({ workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_workstation(::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, validate_only: validate_only, allow_missing: allow_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_workstation_client_stub.call_count - end - end - end - - def test_delete_workstation - # Create test objects. - 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" - validate_only = true - etag = "hello world" - - delete_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_delete_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_workstation ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_workstation(::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_workstation_client_stub.call_count - end - end - end - - def test_start_workstation - # Create test objects. - 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" - validate_only = true - etag = "hello world" - - start_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_start_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, start_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.start_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.start_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.start_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, start_workstation_client_stub.call_count - end - end - end - - def test_stop_workstation - # Create test objects. - 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" - validate_only = true - etag = "hello world" - - stop_workstation_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_stop_workstation_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, stop_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.stop_workstation name: name, validate_only: validate_only, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.stop_workstation ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.stop_workstation(::Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, stop_workstation_client_stub.call_count - end - end - end - - def test_generate_access_token - # Create test objects. - client_result = ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - expire_time = {} - workstation = "hello world" - - generate_access_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Workstations::V1beta::Workstations::Rest::ServiceStub.stub :transcode_generate_access_token_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_access_token_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_access_token({ expire_time: expire_time, workstation: workstation }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_access_token expire_time: expire_time, workstation: workstation do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_access_token({ expire_time: expire_time, workstation: workstation }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_access_token_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::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb deleted file mode 100644 index f211534d13c1..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/google/cloud/workstations/v1beta/workstations_test.rb +++ /dev/null @@ -1,1441 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" - -require "gapic/grpc/service_stub" - -require "google/cloud/workstations/v1beta/workstations_pb" -require "google/cloud/workstations/v1beta/workstations" - -class ::Google::Cloud::Workstations::V1beta::Workstations::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_workstation_cluster - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1beta::WorkstationCluster.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workstation_cluster, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workstation_cluster({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workstation_cluster name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workstation_cluster ::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workstation_cluster({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workstation_cluster(::Google::Cloud::Workstations::V1beta::GetWorkstationClusterRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workstation_cluster_client_stub.call_rpc_count - end - end - - def test_list_workstation_clusters - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstation_clusters_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workstation_clusters, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest, 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_workstation_clusters_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workstation_clusters parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workstation_clusters ::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workstation_clusters({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workstation_clusters(::Google::Cloud::Workstations::V1beta::ListWorkstationClustersRequest.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_workstation_clusters_client_stub.call_rpc_count - end - end - - def test_create_workstation_cluster - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workstation_cluster_id = "hello world" - workstation_cluster = {} - validate_only = true - - create_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workstation_cluster, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["workstation_cluster_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::WorkstationCluster), request["workstation_cluster"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workstation_cluster parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workstation_cluster ::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workstation_cluster({ parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workstation_cluster(::Google::Cloud::Workstations::V1beta::CreateWorkstationClusterRequest.new(parent: parent, workstation_cluster_id: workstation_cluster_id, workstation_cluster: workstation_cluster, 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_workstation_cluster_client_stub.call_rpc_count - end - end - - def test_update_workstation_cluster - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workstation_cluster = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workstation_cluster, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::WorkstationCluster), request["workstation_cluster"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, 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 - client.update_workstation_cluster workstation_cluster: workstation_cluster, update_mask: update_mask, 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 - client.update_workstation_cluster ::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, 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 - client.update_workstation_cluster({ workstation_cluster: workstation_cluster, update_mask: update_mask, 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 - client.update_workstation_cluster(::Google::Cloud::Workstations::V1beta::UpdateWorkstationClusterRequest.new(workstation_cluster: workstation_cluster, update_mask: update_mask, 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_workstation_cluster_client_stub.call_rpc_count - end - end - - def test_delete_workstation_cluster - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - force = true - - delete_workstation_cluster_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workstation_cluster, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workstation_cluster_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workstation_cluster name: name, validate_only: validate_only, etag: etag, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workstation_cluster ::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workstation_cluster({ name: name, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workstation_cluster(::Google::Cloud::Workstations::V1beta::DeleteWorkstationClusterRequest.new(name: name, validate_only: validate_only, etag: etag, 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_workstation_cluster_client_stub.call_rpc_count - end - end - - def test_get_workstation_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1beta::WorkstationConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workstation_config, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workstation_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workstation_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workstation_config ::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workstation_config({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workstation_config(::Google::Cloud::Workstations::V1beta::GetWorkstationConfigRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workstation_config_client_stub.call_rpc_count - end - end - - def test_list_workstation_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstation_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workstation_configs, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest, 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_workstation_configs_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workstation_configs ::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workstation_configs(::Google::Cloud::Workstations::V1beta::ListWorkstationConfigsRequest.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_workstation_configs_client_stub.call_rpc_count - end - end - - def test_list_usable_workstation_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_usable_workstation_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_usable_workstation_configs, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest, 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_usable_workstation_configs_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_usable_workstation_configs parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_usable_workstation_configs ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_usable_workstation_configs({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_usable_workstation_configs(::Google::Cloud::Workstations::V1beta::ListUsableWorkstationConfigsRequest.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_usable_workstation_configs_client_stub.call_rpc_count - end - end - - def test_create_workstation_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workstation_config_id = "hello world" - workstation_config = {} - validate_only = true - - create_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workstation_config, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["workstation_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::WorkstationConfig), request["workstation_config"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workstation_config parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workstation_config ::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workstation_config({ parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workstation_config(::Google::Cloud::Workstations::V1beta::CreateWorkstationConfigRequest.new(parent: parent, workstation_config_id: workstation_config_id, workstation_config: workstation_config, validate_only: validate_only), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_workstation_config_client_stub.call_rpc_count - end - end - - def test_update_workstation_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workstation_config = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workstation_config, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::WorkstationConfig), request["workstation_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, 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 - client.update_workstation_config workstation_config: workstation_config, update_mask: update_mask, 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 - client.update_workstation_config ::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, 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 - client.update_workstation_config({ workstation_config: workstation_config, update_mask: update_mask, 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 - client.update_workstation_config(::Google::Cloud::Workstations::V1beta::UpdateWorkstationConfigRequest.new(workstation_config: workstation_config, update_mask: update_mask, 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_workstation_config_client_stub.call_rpc_count - end - end - - def test_delete_workstation_config - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - force = true - - delete_workstation_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workstation_config, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workstation_config_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workstation_config name: name, validate_only: validate_only, etag: etag, force: force do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workstation_config ::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, force: force) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workstation_config({ name: name, validate_only: validate_only, etag: etag, force: force }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workstation_config(::Google::Cloud::Workstations::V1beta::DeleteWorkstationConfigRequest.new(name: name, validate_only: validate_only, etag: etag, 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_workstation_config_client_stub.call_rpc_count - end - end - - def test_get_workstation - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1beta::Workstation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_workstation({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_workstation name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_workstation ::Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_workstation({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_workstation(::Google::Cloud::Workstations::V1beta::GetWorkstationRequest.new(name: name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_workstation_client_stub.call_rpc_count - end - end - - def test_list_workstations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1beta::ListWorkstationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_workstations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_workstations, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest, 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_workstations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_workstations parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_workstations ::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_workstations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_workstations(::Google::Cloud::Workstations::V1beta::ListWorkstationsRequest.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_workstations_client_stub.call_rpc_count - end - end - - def test_list_usable_workstations - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", 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_usable_workstations_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_usable_workstations, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest, 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_usable_workstations_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_usable_workstations parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_usable_workstations ::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_usable_workstations({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_usable_workstations(::Google::Cloud::Workstations::V1beta::ListUsableWorkstationsRequest.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_usable_workstations_client_stub.call_rpc_count - end - end - - def test_create_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - workstation_id = "hello world" - workstation = {} - validate_only = true - - create_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["workstation_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::Workstation), request["workstation"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_workstation parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_workstation ::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_workstation({ parent: parent, workstation_id: workstation_id, workstation: workstation, validate_only: validate_only }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_workstation(::Google::Cloud::Workstations::V1beta::CreateWorkstationRequest.new(parent: parent, workstation_id: workstation_id, workstation: workstation, 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_workstation_client_stub.call_rpc_count - end - end - - def test_update_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - workstation = {} - update_mask = {} - validate_only = true - allow_missing = true - - update_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Workstations::V1beta::Workstation), request["workstation"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["validate_only"] - assert_equal true, request["allow_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_workstation({ workstation: workstation, update_mask: update_mask, 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 - client.update_workstation workstation: workstation, update_mask: update_mask, 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 - client.update_workstation ::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, 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 - client.update_workstation({ workstation: workstation, update_mask: update_mask, 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 - client.update_workstation(::Google::Cloud::Workstations::V1beta::UpdateWorkstationRequest.new(workstation: workstation, update_mask: update_mask, 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_workstation_client_stub.call_rpc_count - end - end - - def test_delete_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - - delete_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_workstation ::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_workstation(::Google::Cloud::Workstations::V1beta::DeleteWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_workstation_client_stub.call_rpc_count - end - end - - def test_start_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - - start_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :start_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, start_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.start_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.start_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.start_workstation ::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.start_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.start_workstation(::Google::Cloud::Workstations::V1beta::StartWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, start_workstation_client_stub.call_rpc_count - end - end - - def test_stop_workstation - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - etag = "hello world" - - stop_workstation_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :stop_workstation, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, stop_workstation_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.stop_workstation name: name, validate_only: validate_only, etag: etag do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.stop_workstation ::Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.stop_workstation({ name: name, validate_only: validate_only, etag: etag }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.stop_workstation(::Google::Cloud::Workstations::V1beta::StopWorkstationRequest.new(name: name, validate_only: validate_only, etag: etag), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, stop_workstation_client_stub.call_rpc_count - end - end - - def test_generate_access_token - # Create GRPC objects. - grpc_response = ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - expire_time = {} - workstation = "hello world" - - generate_access_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_access_token, name - assert_kind_of ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["expire_time"] - assert_equal :expire_time, request.expiration - assert_equal "hello world", request["workstation"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_access_token_client_stub do - # Create client - client = ::Google::Cloud::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_access_token({ expire_time: expire_time, workstation: workstation }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_access_token expire_time: expire_time, workstation: workstation do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_access_token ::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_access_token({ expire_time: expire_time, workstation: workstation }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_access_token(::Google::Cloud::Workstations::V1beta::GenerateAccessTokenRequest.new(expire_time: expire_time, workstation: workstation), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_access_token_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::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Workstations::V1beta::Workstations::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::Workstations::V1beta::Workstations::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Workstations::V1beta::Workstations::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb b/owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-workstations-v1beta/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-workstations/.gitignore b/owl-bot-staging/google-cloud-workstations/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-workstations/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-cloud-workstations/.repo-metadata.json b/owl-bot-staging/google-cloud-workstations/.repo-metadata.json deleted file mode 100644 index 0ad86f171f24..000000000000 --- a/owl-bot-staging/google-cloud-workstations/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "workstations.googleapis.com", - "api_shortname": "workstations", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-workstations/latest", - "distribution_name": "google-cloud-workstations", - "is_cloud": true, - "language": "ruby", - "name": "workstations", - "name_pretty": "Cloud Workstations API", - "product_documentation": "https://cloud.google.com/workstations/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Allows administrators to create managed developer environments in the cloud.", - "ruby-cloud-product-url": "https://cloud.google.com/workstations/docs", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-workstations/.rubocop.yml b/owl-bot-staging/google-cloud-workstations/.rubocop.yml deleted file mode 100644 index c3bfad84aa94..000000000000 --- a/owl-bot-staging/google-cloud-workstations/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-workstations.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-cloud-workstations.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-workstations/.toys.rb b/owl-bot-staging/google-cloud-workstations/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-workstations/.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-workstations/.yardopts b/owl-bot-staging/google-cloud-workstations/.yardopts deleted file mode 100644 index e7047879b6ba..000000000000 --- a/owl-bot-staging/google-cloud-workstations/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Cloud Workstations API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-workstations/AUTHENTICATION.md b/owl-bot-staging/google-cloud-workstations/AUTHENTICATION.md deleted file mode 100644 index 7824cf9abd38..000000000000 --- a/owl-bot-staging/google-cloud-workstations/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-workstations 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-workstations 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/workstations" - -client = Google::Cloud::Workstations.workstations do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/workstations" - -Google::Cloud::Workstations.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Workstations.workstations -``` - -### 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-workstations -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/workstations" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Workstations.workstations -``` - -### 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-workstations/CHANGELOG.md b/owl-bot-staging/google-cloud-workstations/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-workstations/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-workstations/Gemfile b/owl-bot-staging/google-cloud-workstations/Gemfile deleted file mode 100644 index 5bd361887bb8..000000000000 --- a/owl-bot-staging/google-cloud-workstations/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-workstations-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-workstations.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-workstations/LICENSE.md b/owl-bot-staging/google-cloud-workstations/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-workstations/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-workstations/README.md b/owl-bot-staging/google-cloud-workstations/README.md deleted file mode 100644 index beab088388aa..000000000000 --- a/owl-bot-staging/google-cloud-workstations/README.md +++ /dev/null @@ -1,141 +0,0 @@ -# Ruby Client for the Cloud Workstations API - -Allows administrators to create managed developer environments in the cloud. - - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-workstations-v*`. -The gem `google-cloud-workstations` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations/latest) -for this library, google-cloud-workstations, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-workstations-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/workstations/docs) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-workstations -``` - -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/workstations.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/workstations" - -client = Google::Cloud::Workstations.workstations -request = ::Google::Cloud::Workstations::V1::GetWorkstationClusterRequest.new # (request fields as keyword arguments...) -response = client.get_workstation_cluster request -``` - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-workstations-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-cloud-workstations`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-workstations-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-workstations`. -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-workstations-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-workstations/Rakefile b/owl-bot-staging/google-cloud-workstations/Rakefile deleted file mode 100644 index 80aff46a2109..000000000000 --- a/owl-bot-staging/google-cloud-workstations/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-cloud-workstations 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/workstations/v1/workstations/credentials" - ::Google::Cloud::Workstations::V1::Workstations::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-workstations 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-workstations 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-workstations 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-workstations gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-workstations" - header "google-cloud-workstations rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-workstations yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-workstations 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-workstations 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-workstations 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-workstations/google-cloud-workstations.gemspec b/owl-bot-staging/google-cloud-workstations/google-cloud-workstations.gemspec deleted file mode 100644 index a67c69cf4219..000000000000 --- a/owl-bot-staging/google-cloud-workstations/google-cloud-workstations.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/workstations/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-workstations" - gem.version = Google::Cloud::Workstations::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Allows administrators to create managed developer environments in the cloud." - gem.summary = "Allows administrators to create managed developer environments in the cloud." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-workstations-v1", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-workstations/lib/google-cloud-workstations.rb b/owl-bot-staging/google-cloud-workstations/lib/google-cloud-workstations.rb deleted file mode 100644 index 921e8bf1c4ec..000000000000 --- a/owl-bot-staging/google-cloud-workstations/lib/google-cloud-workstations.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/cloud/workstations" unless defined? Google::Cloud::Workstations::VERSION diff --git a/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations.rb b/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations.rb deleted file mode 100644 index 30a02cf8001a..000000000000 --- a/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations.rb +++ /dev/null @@ -1,156 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/workstations/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :workstations do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Workstations - ## - # Create a new client object for Workstations. - # - # By default, this returns an instance of - # [Google::Cloud::Workstations::V1::Workstations::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-workstations-v1/latest/Google-Cloud-Workstations-V1-Workstations-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Workstations service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Workstations service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Workstations.workstations_available?}. - # - # ## About Workstations - # - # Service for interacting with Cloud Workstations. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.workstations version: :v1, transport: :grpc, &block - require "google/cloud/workstations/#{version.to_s.downcase}" - - package_name = Google::Cloud::Workstations - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Workstations.const_get(package_name).const_get(:Workstations) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Workstations service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Workstations.workstations}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Workstations service, - # or if the versioned client gem needs an update to support the Workstations service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.workstations_available? version: :v1, transport: :grpc - require "google/cloud/workstations/#{version.to_s.downcase}" - package_name = Google::Cloud::Workstations - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Workstations.const_get package_name - return false unless service_module.const_defined? :Workstations - service_module = service_module.const_get :Workstations - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-workstations library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - - # The error codes that should trigger a retry. - # - # @return [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.workstations if block_given? - - ::Google::Cloud.configure.workstations - end - end - end -end - -helper_path = ::File.join __dir__, "workstations", "helpers.rb" -require "google/cloud/workstations/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations/version.rb b/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations/version.rb deleted file mode 100644 index f1ab37b3c792..000000000000 --- a/owl-bot-staging/google-cloud-workstations/lib/google/cloud/workstations/version.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Cloud - module Workstations - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/client_test.rb b/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/client_test.rb deleted file mode 100644 index aa658d02b0ca..000000000000 --- a/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/workstations" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Workstations::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_workstations_grpc - skip unless Google::Cloud::Workstations.workstations_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Workstations.workstations transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Workstations::V1::Workstations::Client, client - end - end - - def test_workstations_rest - skip unless Google::Cloud::Workstations.workstations_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Workstations.workstations transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Workstations::V1::Workstations::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/version_test.rb b/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/version_test.rb deleted file mode 100644 index 578aca1a3e8a..000000000000 --- a/owl-bot-staging/google-cloud-workstations/test/google/cloud/workstations/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/cloud/workstations/version" - -class Google::Cloud::Workstations::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Workstations::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-workstations/test/helper.rb b/owl-bot-staging/google-cloud-workstations/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-workstations/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-client/.gitignore b/owl-bot-staging/google-iam-client/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-iam-client/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-iam-client/.repo-metadata.json b/owl-bot-staging/google-iam-client/.repo-metadata.json deleted file mode 100644 index 6bb4001d9b94..000000000000 --- a/owl-bot-staging/google-iam-client/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "iam.googleapis.com", - "api_shortname": "iam", - "client_documentation": "https://rubydoc.info/gems/google-iam", - "distribution_name": "google-iam", - "is_cloud": false, - "language": "ruby", - "name": "iam", - "name_pretty": "IAM API", - "product_documentation": "https://cloud.google.com/iam", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Manages identity and access control policies for Google Cloud Platform resources.", - "ruby-cloud-product-url": "https://cloud.google.com/iam", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-client/.rubocop.yml b/owl-bot-staging/google-iam-client/.rubocop.yml deleted file mode 100644 index 3d2e7957592c..000000000000 --- a/owl-bot-staging/google-iam-client/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-iam.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-iam-client/.toys.rb b/owl-bot-staging/google-iam-client/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-client/.toys.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -toys_version! ">= 0.15.3" - -if ENV["RUBY_COMMON_TOOLS"] - common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"] - load File.join(common_tools_dir, "toys", "gapic") -else - load_git remote: "https://github.com/googleapis/ruby-common-tools.git", - path: "toys/gapic", - update: true -end diff --git a/owl-bot-staging/google-iam-client/.yardopts b/owl-bot-staging/google-iam-client/.yardopts deleted file mode 100644 index 361931405491..000000000000 --- a/owl-bot-staging/google-iam-client/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="IAM API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-iam-client/AUTHENTICATION.md b/owl-bot-staging/google-iam-client/AUTHENTICATION.md deleted file mode 100644 index 49f1aadc0f0f..000000000000 --- a/owl-bot-staging/google-iam-client/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam 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-iam 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/iam" - -client = Google::Iam.policies do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam" - -Google::Iam.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Iam.policies -``` - -### 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-iam -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/iam" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Iam.policies -``` - -### 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-iam-client/CHANGELOG.md b/owl-bot-staging/google-iam-client/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-client/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-client/Gemfile b/owl-bot-staging/google-iam-client/Gemfile deleted file mode 100644 index 18bab2b116b8..000000000000 --- a/owl-bot-staging/google-iam-client/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-iam-v2"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-iam.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-client/LICENSE.md b/owl-bot-staging/google-iam-client/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-client/LICENSE.md +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/owl-bot-staging/google-iam-client/README.md b/owl-bot-staging/google-iam-client/README.md deleted file mode 100644 index 4a054c8777f2..000000000000 --- a/owl-bot-staging/google-iam-client/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the IAM API - -API Client library for the IAM API - -Manages identity and access control policies for Google Cloud Platform resources. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-iam-v*`. -The gem `google-iam` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://rubydoc.info/gems/google-iam) -for this library, google-iam, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-iam-v2](https://rubydoc.info/gems/google-iam-v2). - -See also the [Product Documentation](https://cloud.google.com/iam) -for more usage information. - -## Quick Start - -``` -$ gem install google-iam -``` - -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/iam.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/iam" - -client = Google::Iam.policies -request = ::Google::Iam::V2::ListPoliciesRequest.new # (request fields as keyword arguments...) -response = client.list_policies request -``` - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-iam-v2](https://rubydoc.info/gems/google-iam-v2). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-iam`, -and lower-level _versioned_ client libraries with names such as -`google-iam-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-iam`. -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-iam-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-iam-client/Rakefile b/owl-bot-staging/google-iam-client/Rakefile deleted file mode 100644 index a66f7608355d..000000000000 --- a/owl-bot-staging/google-iam-client/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-iam 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/iam/v2/policies/credentials" - ::Google::Iam::V2::Policies::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-iam 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-iam 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-iam 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-iam gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam" - header "google-iam rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam yard", "*" - Rake::Task[:yard].invoke - header "google-iam 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-iam 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-iam 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-iam-client/google-iam.gemspec b/owl-bot-staging/google-iam-client/google-iam.gemspec deleted file mode 100644 index 9f1991066a69..000000000000 --- a/owl-bot-staging/google-iam-client/google-iam.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam" - gem.version = Google::Iam::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Manages identity and access control policies for Google Cloud Platform resources." - gem.summary = "API Client library for the IAM API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-iam-v2", ">= 0.5", "< 2.a" -end diff --git a/owl-bot-staging/google-iam-client/lib/google-iam.rb b/owl-bot-staging/google-iam-client/lib/google-iam.rb deleted file mode 100644 index 0b97b3e39bb9..000000000000 --- a/owl-bot-staging/google-iam-client/lib/google-iam.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam" unless defined? Google::Iam::VERSION diff --git a/owl-bot-staging/google-iam-client/lib/google/iam.rb b/owl-bot-staging/google-iam-client/lib/google/iam.rb deleted file mode 100644 index 651ba582ef1c..000000000000 --- a/owl-bot-staging/google-iam-client/lib/google/iam.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! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/iam/version" - -require "googleauth" - -module Google - module Iam - ## - # Create a new client object for Policies. - # - # By default, this returns an instance of - # [Google::Iam::V2::Policies::Client](https://rubydoc.info/gems/google-iam-v2/Google/Iam/V2/Policies/Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Policies service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Policies service. - # You can determine whether the method will succeed by calling - # {Google::Iam.policies_available?}. - # - # ## About Policies - # - # An interface for managing Identity and Access Management (IAM) policies. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.policies version: :v2, transport: :grpc, &block - require "google/iam/#{version.to_s.downcase}" - - package_name = Google::Iam - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Iam.const_get(package_name).const_get(:Policies) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Policies service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Iam.policies}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Policies service, - # or if the versioned client gem needs an update to support the Policies service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.policies_available? version: :v2, transport: :grpc - require "google/iam/#{version.to_s.downcase}" - package_name = Google::Iam - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Iam.const_get package_name - return false unless service_module.const_defined? :Policies - service_module = service_module.const_get :Policies - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - end -end - -helper_path = ::File.join __dir__, "iam", "helpers.rb" -require "google/iam/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-client/lib/google/iam/version.rb b/owl-bot-staging/google-iam-client/lib/google/iam/version.rb deleted file mode 100644 index e33ffca99bef..000000000000 --- a/owl-bot-staging/google-iam-client/lib/google/iam/version.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the 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 - VERSION = "0.0.1" - end -end diff --git a/owl-bot-staging/google-iam-client/test/google/iam/client_test.rb b/owl-bot-staging/google-iam-client/test/google/iam/client_test.rb deleted file mode 100644 index 3bae2afd204c..000000000000 --- a/owl-bot-staging/google-iam-client/test/google/iam/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/iam" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Iam::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_policies_grpc - skip unless Google::Iam.policies_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Iam.policies transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Iam::V2::Policies::Client, client - end - end - - def test_policies_rest - skip unless Google::Iam.policies_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Iam.policies transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Iam::V2::Policies::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-iam-client/test/google/iam/version_test.rb b/owl-bot-staging/google-iam-client/test/google/iam/version_test.rb deleted file mode 100644 index 0e1097a200d4..000000000000 --- a/owl-bot-staging/google-iam-client/test/google/iam/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/iam/version" - -class Google::Iam::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Iam::VERSION - end -end diff --git a/owl-bot-staging/google-iam-client/test/helper.rb b/owl-bot-staging/google-iam-client/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-iam-client/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-credentials-v1/.gitignore b/owl-bot-staging/google-iam-credentials-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-iam-credentials-v1/.repo-metadata.json b/owl-bot-staging/google-iam-credentials-v1/.repo-metadata.json deleted file mode 100644 index 63df137774ef..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "iamcredentials.googleapis.com", - "api_shortname": "iamcredentials", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest", - "distribution_name": "google-iam-credentials-v1", - "is_cloud": true, - "language": "ruby", - "name": "iamcredentials", - "name_pretty": "IAM Service Account Credentials V1 API", - "product_documentation": "https://cloud.google.com/iam", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens. Note that google-iam-credentials-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-credentials instead. See the readme for more details.", - "ruby-cloud-env-prefix": "IAM_CREDENTIALS", - "ruby-cloud-product-url": "https://cloud.google.com/iam", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-credentials-v1/.rubocop.yml b/owl-bot-staging/google-iam-credentials-v1/.rubocop.yml deleted file mode 100644 index 9b2a231aba17..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-credentials-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-iam-credentials-v1.rb" diff --git a/owl-bot-staging/google-iam-credentials-v1/.toys.rb b/owl-bot-staging/google-iam-credentials-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/.yardopts b/owl-bot-staging/google-iam-credentials-v1/.yardopts deleted file mode 100644 index b52365dc43b4..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="IAM Service Account Credentials 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-iam-credentials-v1/AUTHENTICATION.md b/owl-bot-staging/google-iam-credentials-v1/AUTHENTICATION.md deleted file mode 100644 index 1d811fed1a80..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-credentials-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-iam-credentials-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/iam/credentials/v1" - -client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/credentials/v1" - -::Google::Iam::Credentials::V1::IAMCredentials::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Iam::Credentials::V1::IAMCredentials::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-iam-credentials-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/iam/credentials/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Iam::Credentials::V1::IAMCredentials::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-iam-credentials-v1/CHANGELOG.md b/owl-bot-staging/google-iam-credentials-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-credentials-v1/Gemfile b/owl-bot-staging/google-iam-credentials-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-credentials-v1/LICENSE.md b/owl-bot-staging/google-iam-credentials-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/README.md b/owl-bot-staging/google-iam-credentials-v1/README.md deleted file mode 100644 index 6e9c7e5f994f..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the IAM Service Account Credentials V1 API - -Creates short-lived, limited-privilege credentials for IAM service accounts. - -The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the IAM Service Account Credentials V1 API. Most users should consider using -the main client gem, -[google-iam-credentials](https://rubygems.org/gems/google-iam-credentials). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-iam-credentials-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/iamcredentials.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/iam/credentials/v1" - -client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new -request = ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new # (request fields as keyword arguments...) -response = client.generate_access_token request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/iam) -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/iam/credentials/v1" -require "logger" - -client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.logger = Logger.new "my-app.log" -end -``` - -## Google Cloud Samples - -To browse ready to use code samples check [Google Cloud Samples](https://cloud.google.com/docs/samples). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-iam-credentials`, -and lower-level _versioned_ client libraries with names such as -`google-iam-credentials-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-iam-credentials`. -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-iam-credentials-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-iam-credentials-v1/Rakefile b/owl-bot-staging/google-iam-credentials-v1/Rakefile deleted file mode 100644 index d9311daefed7..000000000000 --- a/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["IAM_CREDENTIALS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["IAM_CREDENTIALS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["IAM_CREDENTIALS_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 IAM_CREDENTIALS_TEST_PROJECT=test123 IAM_CREDENTIALS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/iam/credentials/v1/iam_credentials/credentials" - ::Google::Iam::Credentials::V1::IAMCredentials::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["IAM_CREDENTIALS_PROJECT"] = project - ENV["IAM_CREDENTIALS_TEST_PROJECT"] = project - ENV["IAM_CREDENTIALS_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-iam-credentials-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-iam-credentials-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-iam-credentials-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-iam-credentials-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-credentials-v1" - header "google-iam-credentials-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-credentials-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-iam-credentials-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-iam-credentials-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-iam-credentials-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-iam-credentials-v1/gapic_metadata.json b/owl-bot-staging/google-iam-credentials-v1/gapic_metadata.json deleted file mode 100644 index e3528a0323fe..000000000000 --- a/owl-bot-staging/google-iam-credentials-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.iam.credentials.v1", - "libraryPackage": "::Google::Iam::Credentials::V1", - "services": { - "IAMCredentials": { - "clients": { - "grpc": { - "libraryClient": "::Google::Iam::Credentials::V1::IAMCredentials::Client", - "rpcs": { - "GenerateAccessToken": { - "methods": [ - "generate_access_token" - ] - }, - "GenerateIdToken": { - "methods": [ - "generate_id_token" - ] - }, - "SignBlob": { - "methods": [ - "sign_blob" - ] - }, - "SignJwt": { - "methods": [ - "sign_jwt" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-iam-credentials-v1/google-iam-credentials-v1.gemspec b/owl-bot-staging/google-iam-credentials-v1/google-iam-credentials-v1.gemspec deleted file mode 100644 index 8710a11ce560..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/google-iam-credentials-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/credentials/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-credentials-v1" - gem.version = Google::Iam::Credentials::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens. Note that google-iam-credentials-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-iam-credentials instead. See the readme for more details." - gem.summary = "Creates short-lived, limited-privilege credentials for IAM service accounts." - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - `git ls-files -- proto_docs/*`.split("\n") + - ["README.md", "LICENSE.md", "AUTHENTICATION.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google-iam-credentials-v1.rb deleted file mode 100644 index ed2f7cb1dc33..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google-iam-credentials-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/iam/credentials/v1" diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1.rb deleted file mode 100644 index a614ad91054b..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/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/iam/credentials/v1/iam_credentials" -require "google/iam/credentials/v1/version" - -module Google - module Iam - module Credentials - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/iam/credentials/v1" - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/iam/credentials/v1" - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/iam/credentials/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb deleted file mode 100644 index 54447155b556..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/common_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/credentials/v1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/iam/credentials/v1/common.proto\x12\x19google.iam.credentials.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa9\x01\n\x1aGenerateAccessTokenRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x02 \x03(\t\x12\x12\n\x05scope\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12+\n\x08lifetime\x18\x07 \x01(\x0b\x32\x19.google.protobuf.Duration\"d\n\x1bGenerateAccessTokenResponse\x12\x14\n\x0c\x61\x63\x63\x65ss_token\x18\x01 \x01(\t\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"s\n\x0fSignBlobRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x03 \x03(\t\x12\x14\n\x07payload\x18\x05 \x01(\x0c\x42\x03\xe0\x41\x02\"7\n\x10SignBlobResponse\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x13\n\x0bsigned_blob\x18\x04 \x01(\x0c\"r\n\x0eSignJwtRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x03 \x03(\t\x12\x14\n\x07payload\x18\x05 \x01(\tB\x03\xe0\x41\x02\"5\n\x0fSignJwtResponse\x12\x0e\n\x06key_id\x18\x01 \x01(\t\x12\x12\n\nsigned_jwt\x18\x02 \x01(\t\"\x92\x01\n\x16GenerateIdTokenRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x11\n\tdelegates\x18\x02 \x03(\t\x12\x15\n\x08\x61udience\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\rinclude_email\x18\x04 \x01(\x08\"(\n\x17GenerateIdTokenResponse\x12\r\n\x05token\x18\x01 \x01(\tB\xac\x02\n#com.google.cloud.iam.credentials.v1B\x19IAMCredentialsCommonProtoP\x01ZEcloud.google.com/go/iam/credentials/apiv1/credentialspb;credentialspb\xf8\x01\x01\xaa\x02\x1fGoogle.Cloud.Iam.Credentials.V1\xca\x02\x1fGoogle\\Cloud\\Iam\\Credentials\\V1\xea\x41Y\n!iam.googleapis.com/ServiceAccount\x12\x34projects/{project}/serviceAccounts/{service_account}b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Iam - module Credentials - module V1 - GenerateAccessTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.GenerateAccessTokenRequest").msgclass - GenerateAccessTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.GenerateAccessTokenResponse").msgclass - SignBlobRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.SignBlobRequest").msgclass - SignBlobResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.SignBlobResponse").msgclass - SignJwtRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.SignJwtRequest").msgclass - SignJwtResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.SignJwtResponse").msgclass - GenerateIdTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.GenerateIdTokenRequest").msgclass - GenerateIdTokenResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.iam.credentials.v1.GenerateIdTokenResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.rb deleted file mode 100644 index f97cbb3723e3..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials.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/iam/credentials/v1/version" - -require "google/iam/credentials/v1/iam_credentials/credentials" -require "google/iam/credentials/v1/iam_credentials/paths" -require "google/iam/credentials/v1/iam_credentials/client" -require "google/iam/credentials/v1/iam_credentials/rest" - -module Google - module Iam - module Credentials - module V1 - ## - # A service account is a special type of Google account that belongs to your - # application or a virtual machine (VM), instead of to an individual end user. - # Your application assumes the identity of the service account to call Google - # APIs, so that the users aren't directly involved. - # - # Service account credentials are used to temporarily assume the identity - # of the service account. Supported credential types include OAuth 2.0 access - # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and - # more. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/iam/credentials/v1/iam_credentials" - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/iam/credentials/v1/iam_credentials/rest" - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new - # - module IAMCredentials - end - end - end - end -end - -helper_path = ::File.join __dir__, "iam_credentials", "helpers.rb" -require "google/iam/credentials/v1/iam_credentials/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb deleted file mode 100644 index b1369925485c..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/client.rb +++ /dev/null @@ -1,854 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/credentials/v1/iamcredentials_pb" - -module Google - module Iam - module Credentials - module V1 - module IAMCredentials - ## - # Client for the IAMCredentials service. - # - # A service account is a special type of Google account that belongs to your - # application or a virtual machine (VM), instead of to an individual end user. - # Your application assumes the identity of the service account to call Google - # APIs, so that the users aren't directly involved. - # - # Service account credentials are used to temporarily assume the identity - # of the service account. Supported credential types include OAuth 2.0 access - # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and - # more. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iamcredentials.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :iam_credentials_stub - - ## - # Configure the IAMCredentials Client class. - # - # See {::Google::Iam::Credentials::V1::IAMCredentials::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IAMCredentials clients - # ::Google::Iam::Credentials::V1::IAMCredentials::Client.configure do |config| - # config.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", "Credentials", "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.generate_access_token.timeout = 60.0 - default_config.rpcs.generate_access_token.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.generate_id_token.timeout = 60.0 - default_config.rpcs.generate_id_token.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.sign_blob.timeout = 60.0 - default_config.rpcs.sign_blob.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.sign_jwt.timeout = 60.0 - default_config.rpcs.sign_jwt.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 IAMCredentials Client instance. - # - # The configuration is set to the derived mode, meaning that 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::Credentials::V1::IAMCredentials::Client::Configuration} - # for a description of the configuration fields. - # - # @yield [config] Configure the Client client. - # @yieldparam 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_credentials_stub.universe_domain - end - - ## - # Create a new IAMCredentials client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IAMCredentials 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/credentials/v1/iamcredentials_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_credentials_stub = ::Gapic::ServiceStub.new( - ::Google::Iam::Credentials::V1::IAMCredentials::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_credentials_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 - @iam_credentials_stub.logger - end - - # Service calls - - ## - # Generates an OAuth 2.0 access token for a service account. - # - # @overload generate_access_token(request, options = nil) - # Pass arguments to `generate_access_token` via a request object, either of type - # {::Google::Iam::Credentials::V1::GenerateAccessTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::Credentials::V1::GenerateAccessTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_token(name: nil, delegates: nil, scope: nil, lifetime: nil) - # Pass arguments to `generate_access_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param delegates [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param scope [::Array<::String>] - # Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - # See https://developers.google.com/identity/protocols/googlescopes for more - # information. - # At least one value required. - # @param lifetime [::Google::Protobuf::Duration, ::Hash] - # The desired lifetime duration of the access token in seconds. - # Must be set to a value less than or equal to 3600 (1 hour). If a value is - # not specified, the token's lifetime will be set to a default value of one - # hour. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/credentials/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::Credentials::V1::IAMCredentials::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new - # - # # Call the generate_access_token method. - # result = client.generate_access_token request - # - # # The returned object is of type Google::Iam::Credentials::V1::GenerateAccessTokenResponse. - # p result - # - def generate_access_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest - - # Converts hash and nil to 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_access_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::Credentials::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_access_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_access_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_credentials_stub.call_rpc :generate_access_token, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Generates an OpenID Connect ID token for a service account. - # - # @overload generate_id_token(request, options = nil) - # Pass arguments to `generate_id_token` via a request object, either of type - # {::Google::Iam::Credentials::V1::GenerateIdTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::Credentials::V1::GenerateIdTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_id_token(name: nil, delegates: nil, audience: nil, include_email: nil) - # Pass arguments to `generate_id_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param delegates [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param audience [::String] - # Required. The audience for the token, such as the API or account that this token - # grants access to. - # @param include_email [::Boolean] - # Include the service account email in the token. If set to `true`, the - # token will contain `email` and `email_verified` claims. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/credentials/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::Credentials::V1::IAMCredentials::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::Credentials::V1::GenerateIdTokenRequest.new - # - # # Call the generate_id_token method. - # result = client.generate_id_token request - # - # # The returned object is of type Google::Iam::Credentials::V1::GenerateIdTokenResponse. - # p result - # - def generate_id_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::GenerateIdTokenRequest - - # Converts hash and nil to 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_id_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::Credentials::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_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_id_token.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_id_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_credentials_stub.call_rpc :generate_id_token, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Signs a blob using a service account's system-managed private key. - # - # @overload sign_blob(request, options = nil) - # Pass arguments to `sign_blob` via a request object, either of type - # {::Google::Iam::Credentials::V1::SignBlobRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::Credentials::V1::SignBlobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload sign_blob(name: nil, delegates: nil, payload: nil) - # Pass arguments to `sign_blob` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param delegates [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param payload [::String] - # Required. The bytes to sign. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::Credentials::V1::SignBlobResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::Credentials::V1::SignBlobResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/credentials/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::Credentials::V1::IAMCredentials::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::Credentials::V1::SignBlobRequest.new - # - # # Call the sign_blob method. - # result = client.sign_blob request - # - # # The returned object is of type Google::Iam::Credentials::V1::SignBlobResponse. - # p result - # - def sign_blob request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::SignBlobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.sign_blob.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::Credentials::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.sign_blob.timeout, - metadata: metadata, - retry_policy: @config.rpcs.sign_blob.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_credentials_stub.call_rpc :sign_blob, request, options: options do |response, operation| - yield response, operation if block_given? - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Signs a JWT using a service account's system-managed private key. - # - # @overload sign_jwt(request, options = nil) - # Pass arguments to `sign_jwt` via a request object, either of type - # {::Google::Iam::Credentials::V1::SignJwtRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::Credentials::V1::SignJwtRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload sign_jwt(name: nil, delegates: nil, payload: nil) - # Pass arguments to `sign_jwt` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or 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 service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param delegates [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param payload [::String] - # Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Iam::Credentials::V1::SignJwtResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Iam::Credentials::V1::SignJwtResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/iam/credentials/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::Credentials::V1::IAMCredentials::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::Credentials::V1::SignJwtRequest.new - # - # # Call the sign_jwt method. - # result = client.sign_jwt request - # - # # The returned object is of type Google::Iam::Credentials::V1::SignJwtResponse. - # p result - # - def sign_jwt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::SignJwtRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.sign_jwt.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::Credentials::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.name - header_params["name"] = request.name - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.sign_jwt.timeout, - metadata: metadata, - retry_policy: @config.rpcs.sign_jwt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_credentials_stub.call_rpc :sign_jwt, request, 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 IAMCredentials API. - # - # This class represents the configuration for IAMCredentials, - # providing control 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::Credentials::V1::IAMCredentials::Client::Configuration::Rpcs} - # for a list of RPCs that can be configured independently. - # - # Configuration can be applied globally to all clients, or to a single client - # on construction. - # - # @example - # - # # Modify the global config, setting the timeout for - # # generate_access_token to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::Credentials::V1::IAMCredentials::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.generate_access_token.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.generate_access_token.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint 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::Credentials::V1::IAMCredentials::Client.new do |config| - # config.credentials = credentials - # end - # - # @note Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] channel_args - # Extra parameters passed to the gRPC channel. Note: this is ignored if a - # `GRPC::Core::Channel` object is provided as the credential. - # @return [::Hash] - # @!attribute [rw] interceptors - # An array of interceptors that are run before calls are executed. - # @return [::Array<::GRPC::ClientInterceptor>] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional gRPC headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iamcredentials.googleapis.com" - - config_attr :endpoint, nil, ::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 IAMCredentials API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `generate_access_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_access_token - ## - # RPC-specific configuration for `generate_id_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_id_token - ## - # RPC-specific configuration for `sign_blob` - # @return [::Gapic::Config::Method] - # - attr_reader :sign_blob - ## - # RPC-specific configuration for `sign_jwt` - # @return [::Gapic::Config::Method] - # - attr_reader :sign_jwt - - # @private - def initialize parent_rpcs = nil - generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token - @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config - generate_id_token_config = parent_rpcs.generate_id_token if parent_rpcs.respond_to? :generate_id_token - @generate_id_token = ::Gapic::Config::Method.new generate_id_token_config - sign_blob_config = parent_rpcs.sign_blob if parent_rpcs.respond_to? :sign_blob - @sign_blob = ::Gapic::Config::Method.new sign_blob_config - sign_jwt_config = parent_rpcs.sign_jwt if parent_rpcs.respond_to? :sign_jwt - @sign_jwt = ::Gapic::Config::Method.new sign_jwt_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/credentials.rb deleted file mode 100644 index 7cb79642525d..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/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 Iam - module Credentials - module V1 - module IAMCredentials - # Credentials for the IAMCredentials API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "IAM_CREDENTIALS_CREDENTIALS", - "IAM_CREDENTIALS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "IAM_CREDENTIALS_CREDENTIALS_JSON", - "IAM_CREDENTIALS_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-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/paths.rb deleted file mode 100644 index a57ff6ec11e5..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/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 Iam - module Credentials - module V1 - module IAMCredentials - # Path helper methods for the IAMCredentials API. - module Paths - ## - # Create a fully-qualified ServiceAccount resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/serviceAccounts/{service_account}` - # - # @param project [String] - # @param service_account [String] - # - # @return [::String] - def service_account_path project:, service_account: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/serviceAccounts/#{service_account}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest.rb deleted file mode 100644 index 80ffb5c62a94..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/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/iam/credentials/v1/version" - -require "google/iam/credentials/v1/iam_credentials/credentials" -require "google/iam/credentials/v1/iam_credentials/paths" -require "google/iam/credentials/v1/iam_credentials/rest/client" - -module Google - module Iam - module Credentials - module V1 - ## - # A service account is a special type of Google account that belongs to your - # application or a virtual machine (VM), instead of to an individual end user. - # Your application assumes the identity of the service account to call Google - # APIs, so that the users aren't directly involved. - # - # Service account credentials are used to temporarily assume the identity - # of the service account. Supported credential types include OAuth 2.0 access - # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and - # more. - # - # To load this service and instantiate a REST client: - # - # require "google/iam/credentials/v1/iam_credentials/rest" - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new - # - module IAMCredentials - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/iam/credentials/v1/iam_credentials/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb deleted file mode 100644 index 9771a2dee4a6..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/client.rb +++ /dev/null @@ -1,783 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the 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/credentials/v1/iamcredentials_pb" -require "google/iam/credentials/v1/iam_credentials/rest/service_stub" - -module Google - module Iam - module Credentials - module V1 - module IAMCredentials - module Rest - ## - # REST client for the IAMCredentials service. - # - # A service account is a special type of Google account that belongs to your - # application or a virtual machine (VM), instead of to an individual end user. - # Your application assumes the identity of the service account to call Google - # APIs, so that the users aren't directly involved. - # - # Service account credentials are used to temporarily assume the identity - # of the service account. Supported credential types include OAuth 2.0 access - # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and - # more. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "iamcredentials.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :iam_credentials_stub - - ## - # Configure the IAMCredentials Client class. - # - # See {::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all IAMCredentials clients - # ::Google::Iam::Credentials::V1::IAMCredentials::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", "Credentials", "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.generate_access_token.timeout = 60.0 - default_config.rpcs.generate_access_token.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.generate_id_token.timeout = 60.0 - default_config.rpcs.generate_id_token.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.sign_blob.timeout = 60.0 - default_config.rpcs.sign_blob.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.sign_jwt.timeout = 60.0 - default_config.rpcs.sign_jwt.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 IAMCredentials Client instance. - # - # The configuration is set to the derived mode, meaning that 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::Credentials::V1::IAMCredentials::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_credentials_stub.universe_domain - end - - ## - # Create a new IAMCredentials REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the IAMCredentials 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_credentials_stub = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @iam_credentials_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 - @iam_credentials_stub.logger - end - - # Service calls - - ## - # Generates an OAuth 2.0 access token for a service account. - # - # @overload generate_access_token(request, options = nil) - # Pass arguments to `generate_access_token` via a request object, either of type - # {::Google::Iam::Credentials::V1::GenerateAccessTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::Credentials::V1::GenerateAccessTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_access_token(name: nil, delegates: nil, scope: nil, lifetime: nil) - # Pass arguments to `generate_access_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param delegates [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param scope [::Array<::String>] - # Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - # See https://developers.google.com/identity/protocols/googlescopes for more - # information. - # At least one value required. - # @param lifetime [::Google::Protobuf::Duration, ::Hash] - # The desired lifetime duration of the access token in seconds. - # Must be set to a value less than or equal to 3600 (1 hour). If a value is - # not specified, the token's lifetime will be set to a default value of one - # hour. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/credentials/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new - # - # # Call the generate_access_token method. - # result = client.generate_access_token request - # - # # The returned object is of type Google::Iam::Credentials::V1::GenerateAccessTokenResponse. - # p result - # - def generate_access_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest - - # Converts hash and nil to an 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_access_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::Credentials::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_access_token.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_access_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_credentials_stub.generate_access_token request, 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 an OpenID Connect ID token for a service account. - # - # @overload generate_id_token(request, options = nil) - # Pass arguments to `generate_id_token` via a request object, either of type - # {::Google::Iam::Credentials::V1::GenerateIdTokenRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::Credentials::V1::GenerateIdTokenRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_id_token(name: nil, delegates: nil, audience: nil, include_email: nil) - # Pass arguments to `generate_id_token` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param delegates [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param audience [::String] - # Required. The audience for the token, such as the API or account that this token - # grants access to. - # @param include_email [::Boolean] - # Include the service account email in the token. If set to `true`, the - # token will contain `email` and `email_verified` claims. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/credentials/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::Credentials::V1::GenerateIdTokenRequest.new - # - # # Call the generate_id_token method. - # result = client.generate_id_token request - # - # # The returned object is of type Google::Iam::Credentials::V1::GenerateIdTokenResponse. - # p result - # - def generate_id_token request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::GenerateIdTokenRequest - - # Converts hash and nil to an 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_id_token.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::Credentials::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_id_token.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_id_token.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_credentials_stub.generate_id_token request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Signs a blob using a service account's system-managed private key. - # - # @overload sign_blob(request, options = nil) - # Pass arguments to `sign_blob` via a request object, either of type - # {::Google::Iam::Credentials::V1::SignBlobRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::Credentials::V1::SignBlobRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload sign_blob(name: nil, delegates: nil, payload: nil) - # Pass arguments to `sign_blob` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param delegates [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param payload [::String] - # Required. The bytes to sign. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::Credentials::V1::SignBlobResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::Credentials::V1::SignBlobResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/credentials/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::Credentials::V1::SignBlobRequest.new - # - # # Call the sign_blob method. - # result = client.sign_blob request - # - # # The returned object is of type Google::Iam::Credentials::V1::SignBlobResponse. - # p result - # - def sign_blob request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::SignBlobRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.sign_blob.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::Credentials::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.sign_blob.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.sign_blob.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_credentials_stub.sign_blob request, options do |result, operation| - yield result, operation if block_given? - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Signs a JWT using a service account's system-managed private key. - # - # @overload sign_jwt(request, options = nil) - # Pass arguments to `sign_jwt` via a request object, either of type - # {::Google::Iam::Credentials::V1::SignJwtRequest} or an equivalent Hash. - # - # @param request [::Google::Iam::Credentials::V1::SignJwtRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload sign_jwt(name: nil, delegates: nil, payload: nil) - # Pass arguments to `sign_jwt` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or 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 service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param delegates [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @param payload [::String] - # Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Iam::Credentials::V1::SignJwtResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::Credentials::V1::SignJwtResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/iam/credentials/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Iam::Credentials::V1::SignJwtRequest.new - # - # # Call the sign_jwt method. - # result = client.sign_jwt request - # - # # The returned object is of type Google::Iam::Credentials::V1::SignJwtResponse. - # p result - # - def sign_jwt request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Iam::Credentials::V1::SignJwtRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.sign_jwt.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Iam::Credentials::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.sign_jwt.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.sign_jwt.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @iam_credentials_stub.sign_jwt request, 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 IAMCredentials REST API. - # - # This class represents the configuration for IAMCredentials 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::Credentials::V1::IAMCredentials::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 - # # generate_access_token to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.generate_access_token.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.generate_access_token.timeout = 20.0 - # end - # - # @!attribute [rw] endpoint - # A custom service endpoint, as a hostname or hostname:port. The default is - # nil, indicating to use the default endpoint in the current universe domain. - # @return [::String,nil] - # @!attribute [rw] credentials - # Credentials to send with calls. You may provide any of the following types: - # * (`String`) The path to a service account key file in JSON format - # * (`Hash`) A service account key as a Hash - # * (`Google::Auth::Credentials`) A googleauth credentials object - # (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials)) - # * (`Signet::OAuth2::Client`) A signet oauth2 client object - # (see the [signet docs](https://rubydoc.info/gems/signet/Signet/OAuth2/Client)) - # * (`nil`) indicating no credentials - # - # Warning: If you accept a credential configuration (JSON file or Hash) from an - # external source for authentication to Google Cloud, you must validate it before - # providing it to a Google API client library. Providing an unvalidated credential - # configuration to Google APIs can compromise the security of your systems and data. - # For more information, refer to [Validate credential configurations from external - # sources](https://cloud.google.com/docs/authentication/external/externally-sourced-credentials). - # @return [::Object] - # @!attribute [rw] scope - # The OAuth scopes - # @return [::Array<::String>] - # @!attribute [rw] lib_name - # The library name as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] lib_version - # The library version as recorded in instrumentation and logging - # @return [::String] - # @!attribute [rw] timeout - # The call timeout in seconds. - # @return [::Numeric] - # @!attribute [rw] metadata - # Additional headers to be sent with the call. - # @return [::Hash{::Symbol=>::String}] - # @!attribute [rw] retry_policy - # The retry policy. The value is a hash with the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # @return [::Hash] - # @!attribute [rw] quota_project - # A separate project against which to charge quota. - # @return [::String] - # @!attribute [rw] universe_domain - # The universe domain within which to make requests. This determines the - # default endpoint URL. The default value of nil uses the environment - # universe (usually the default "googleapis.com" universe). - # @return [::String,nil] - # @!attribute [rw] logger - # A custom logger to use for request/response debug logging, or the value - # `:default` (the default) to construct a default logger, or `nil` to - # explicitly disable logging. - # @return [::Logger,:default,nil] - # - class Configuration - extend ::Gapic::Config - - # @private - # The endpoint specific to the default "googleapis.com" universe. Deprecated. - DEFAULT_ENDPOINT = "iamcredentials.googleapis.com" - - config_attr :endpoint, nil, ::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 IAMCredentials API. - # - # Includes fields providing the configuration for each RPC in this service. - # Each configuration object is of type `Gapic::Config::Method` and includes - # the following configuration fields: - # - # * `timeout` (*type:* `Numeric`) - The call timeout in seconds - # * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional headers - # * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields - # include the following keys: - # * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds. - # * `:max_delay` (*type:* `Numeric`) - The max delay in seconds. - # * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier. - # * `:retry_codes` (*type:* `Array`) - The error codes that should - # trigger a retry. - # - class Rpcs - ## - # RPC-specific configuration for `generate_access_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_access_token - ## - # RPC-specific configuration for `generate_id_token` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_id_token - ## - # RPC-specific configuration for `sign_blob` - # @return [::Gapic::Config::Method] - # - attr_reader :sign_blob - ## - # RPC-specific configuration for `sign_jwt` - # @return [::Gapic::Config::Method] - # - attr_reader :sign_jwt - - # @private - def initialize parent_rpcs = nil - generate_access_token_config = parent_rpcs.generate_access_token if parent_rpcs.respond_to? :generate_access_token - @generate_access_token = ::Gapic::Config::Method.new generate_access_token_config - generate_id_token_config = parent_rpcs.generate_id_token if parent_rpcs.respond_to? :generate_id_token - @generate_id_token = ::Gapic::Config::Method.new generate_id_token_config - sign_blob_config = parent_rpcs.sign_blob if parent_rpcs.respond_to? :sign_blob - @sign_blob = ::Gapic::Config::Method.new sign_blob_config - sign_jwt_config = parent_rpcs.sign_jwt if parent_rpcs.respond_to? :sign_jwt - @sign_jwt = ::Gapic::Config::Method.new sign_jwt_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb deleted file mode 100644 index c6cfe4454df2..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iam_credentials/rest/service_stub.rb +++ /dev/null @@ -1,329 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See 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/credentials/v1/iamcredentials_pb" - -module Google - module Iam - module Credentials - module V1 - module IAMCredentials - module Rest - ## - # REST service stub for the IAMCredentials 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 generate_access_token REST call - # - # @param request_pb [::Google::Iam::Credentials::V1::GenerateAccessTokenRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Credentials::V1::GenerateAccessTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::Credentials::V1::GenerateAccessTokenResponse] - # A result object deserialized from the server's reply - def generate_access_token request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_access_token_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_access_token", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::Credentials::V1::GenerateAccessTokenResponse.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_id_token REST call - # - # @param request_pb [::Google::Iam::Credentials::V1::GenerateIdTokenRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Credentials::V1::GenerateIdTokenResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::Credentials::V1::GenerateIdTokenResponse] - # A result object deserialized from the server's reply - def generate_id_token request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_id_token_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_id_token", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::Credentials::V1::GenerateIdTokenResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the sign_blob REST call - # - # @param request_pb [::Google::Iam::Credentials::V1::SignBlobRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Credentials::V1::SignBlobResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::Credentials::V1::SignBlobResponse] - # A result object deserialized from the server's reply - def sign_blob request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_sign_blob_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "sign_blob", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::Credentials::V1::SignBlobResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the sign_jwt REST call - # - # @param request_pb [::Google::Iam::Credentials::V1::SignJwtRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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::Credentials::V1::SignJwtResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Iam::Credentials::V1::SignJwtResponse] - # A result object deserialized from the server's reply - def sign_jwt request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_sign_jwt_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "sign_jwt", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Iam::Credentials::V1::SignJwtResponse.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 generate_access_token REST call - # - # @param request_pb [::Google::Iam::Credentials::V1::GenerateAccessTokenRequest] - # 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_access_token_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:generateAccessToken", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/serviceAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_id_token REST call - # - # @param request_pb [::Google::Iam::Credentials::V1::GenerateIdTokenRequest] - # 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_id_token_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:generateIdToken", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/serviceAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the sign_blob REST call - # - # @param request_pb [::Google::Iam::Credentials::V1::SignBlobRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_sign_blob_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:signBlob", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/serviceAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the sign_jwt REST call - # - # @param request_pb [::Google::Iam::Credentials::V1::SignJwtRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_sign_jwt_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:signJwt", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/serviceAccounts/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb deleted file mode 100644 index 6fd166a77a41..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/iam/credentials/v1/iamcredentials.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/iam/credentials/v1/common_pb' - - -descriptor_data = "\n.google/iam/credentials/v1/iamcredentials.proto\x12\x19google.iam.credentials.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a&google/iam/credentials/v1/common.proto2\xad\x07\n\x0eIAMCredentials\x12\xec\x01\n\x13GenerateAccessToken\x12\x35.google.iam.credentials.v1.GenerateAccessTokenRequest\x1a\x36.google.iam.credentials.v1.GenerateAccessTokenResponse\"f\xda\x41\x1dname,delegates,scope,lifetime\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/serviceAccounts/*}:generateAccessToken:\x01*\x12\xe4\x01\n\x0fGenerateIdToken\x12\x31.google.iam.credentials.v1.GenerateIdTokenRequest\x1a\x32.google.iam.credentials.v1.GenerateIdTokenResponse\"j\xda\x41%name,delegates,audience,include_email\x82\xd3\xe4\x93\x02<\"7/v1/{name=projects/*/serviceAccounts/*}:generateIdToken:\x01*\x12\xb9\x01\n\x08SignBlob\x12*.google.iam.credentials.v1.SignBlobRequest\x1a+.google.iam.credentials.v1.SignBlobResponse\"T\xda\x41\x16name,delegates,payload\x82\xd3\xe4\x93\x02\x35\"0/v1/{name=projects/*/serviceAccounts/*}:signBlob:\x01*\x12\xb5\x01\n\x07SignJwt\x12).google.iam.credentials.v1.SignJwtRequest\x1a*.google.iam.credentials.v1.SignJwtResponse\"S\xda\x41\x16name,delegates,payload\x82\xd3\xe4\x93\x02\x34\"//v1/{name=projects/*/serviceAccounts/*}:signJwt:\x01*\x1aQ\xca\x41\x1diamcredentials.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xca\x01\n#com.google.cloud.iam.credentials.v1B\x13IAMCredentialsProtoP\x01ZEcloud.google.com/go/iam/credentials/apiv1/credentialspb;credentialspb\xf8\x01\x01\xaa\x02\x1fGoogle.Cloud.Iam.Credentials.V1\xca\x02\x1fGoogle\\Cloud\\Iam\\Credentials\\V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Iam - module Credentials - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb deleted file mode 100644 index a550a8f0fcfe..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/iamcredentials_services_pb.rb +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/iam/credentials/v1/iamcredentials.proto for package 'google.iam.credentials.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/iam/credentials/v1/iamcredentials_pb' - -module Google - module Iam - module Credentials - module V1 - module IAMCredentials - # A service account is a special type of Google account that belongs to your - # application or a virtual machine (VM), instead of to an individual end user. - # Your application assumes the identity of the service account to call Google - # APIs, so that the users aren't directly involved. - # - # Service account credentials are used to temporarily assume the identity - # of the service account. Supported credential types include OAuth 2.0 access - # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and - # more. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.iam.credentials.v1.IAMCredentials' - - # Generates an OAuth 2.0 access token for a service account. - rpc :GenerateAccessToken, ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest, ::Google::Iam::Credentials::V1::GenerateAccessTokenResponse - # Generates an OpenID Connect ID token for a service account. - rpc :GenerateIdToken, ::Google::Iam::Credentials::V1::GenerateIdTokenRequest, ::Google::Iam::Credentials::V1::GenerateIdTokenResponse - # Signs a blob using a service account's system-managed private key. - rpc :SignBlob, ::Google::Iam::Credentials::V1::SignBlobRequest, ::Google::Iam::Credentials::V1::SignBlobResponse - # Signs a JWT using a service account's system-managed private key. - rpc :SignJwt, ::Google::Iam::Credentials::V1::SignJwtRequest, ::Google::Iam::Credentials::V1::SignJwtResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/rest.rb deleted file mode 100644 index 68ade197545e..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/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/iam/credentials/v1/iam_credentials/rest" -require "google/iam/credentials/v1/version" - -module Google - module Iam - module Credentials - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/iam/credentials/v1/rest" - # client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/version.rb b/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/v1/version.rb deleted file mode 100644 index 8e69fe1e8479..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/lib/google/iam/credentials/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 Iam - module Credentials - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/proto_docs/README.md b/owl-bot-staging/google-iam-credentials-v1/proto_docs/README.md deleted file mode 100644 index b9037a182cf2..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# IAM Service Account Credentials 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-iam-credentials-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/client.rb +++ /dev/null @@ -1,473 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Api - # Required information for every language. - # @!attribute [rw] reference_docs_uri - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Link to automatically generated reference documentation. Example: - # https://cloud.google.com/nodejs/docs/reference/asset/latest - # @!attribute [rw] destinations - # @return [::Array<::Google::Api::ClientLibraryDestination>] - # The destination where API teams want this client library to be published. - # @!attribute [rw] selective_gapic_generation - # @return [::Google::Api::SelectiveGapicGeneration] - # Configuration for which RPCs should be generated in the GAPIC client. - class CommonLanguageSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Details about how and where to publish client libraries. - # @!attribute [rw] version - # @return [::String] - # Version of the API to apply these settings to. This is the full protobuf - # package for the API, ending in the version element. - # Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". - # @!attribute [rw] launch_stage - # @return [::Google::Api::LaunchStage] - # Launch stage of this version of the API. - # @!attribute [rw] rest_numeric_enums - # @return [::Boolean] - # When using transport=rest, the client request will encode enums as - # numbers rather than strings. - # @!attribute [rw] java_settings - # @return [::Google::Api::JavaSettings] - # Settings for legacy Java features, supported in the Service YAML. - # @!attribute [rw] cpp_settings - # @return [::Google::Api::CppSettings] - # Settings for C++ client libraries. - # @!attribute [rw] php_settings - # @return [::Google::Api::PhpSettings] - # Settings for PHP client libraries. - # @!attribute [rw] python_settings - # @return [::Google::Api::PythonSettings] - # Settings for Python client libraries. - # @!attribute [rw] node_settings - # @return [::Google::Api::NodeSettings] - # Settings for Node client libraries. - # @!attribute [rw] dotnet_settings - # @return [::Google::Api::DotnetSettings] - # Settings for .NET client libraries. - # @!attribute [rw] ruby_settings - # @return [::Google::Api::RubySettings] - # Settings for Ruby client libraries. - # @!attribute [rw] go_settings - # @return [::Google::Api::GoSettings] - # Settings for Go client libraries. - class ClientLibrarySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # This message configures the settings for publishing [Google Cloud Client - # libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) - # generated from the service config. - # @!attribute [rw] method_settings - # @return [::Array<::Google::Api::MethodSettings>] - # A list of API method settings, e.g. the behavior for methods that use the - # long-running operation pattern. - # @!attribute [rw] new_issue_uri - # @return [::String] - # Link to a *public* URI where users can report issues. Example: - # https://issuetracker.google.com/issues/new?component=190865&template=1161103 - # @!attribute [rw] documentation_uri - # @return [::String] - # Link to product home page. Example: - # https://cloud.google.com/asset-inventory/docs/overview - # @!attribute [rw] api_short_name - # @return [::String] - # Used as a tracking tag when collecting data about the APIs developer - # relations artifacts like docs, packages delivered to package managers, - # etc. Example: "speech". - # @!attribute [rw] github_label - # @return [::String] - # GitHub label to apply to issues and pull requests opened for this API. - # @!attribute [rw] codeowner_github_teams - # @return [::Array<::String>] - # GitHub teams to be added to CODEOWNERS in the directory in GitHub - # containing source code for the client libraries for this API. - # @!attribute [rw] doc_tag_prefix - # @return [::String] - # A prefix used in sample code when demarking regions to be included in - # documentation. - # @!attribute [rw] organization - # @return [::Google::Api::ClientLibraryOrganization] - # For whom the client library is being published. - # @!attribute [rw] library_settings - # @return [::Array<::Google::Api::ClientLibrarySettings>] - # Client library settings. If the same version string appears multiple - # times in this list, then the last one wins. Settings from earlier - # settings with the same version string are discarded. - # @!attribute [rw] proto_reference_documentation_uri - # @return [::String] - # Optional link to proto reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rpc - # @!attribute [rw] rest_reference_documentation_uri - # @return [::String] - # Optional link to REST reference documentation. Example: - # https://cloud.google.com/pubsub/lite/docs/reference/rest - class Publishing - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Java client libraries. - # @!attribute [rw] library_package - # @return [::String] - # The package name to use in Java. Clobbers the java_package option - # set in the protobuf. This should be used **only** by APIs - # who have already set the language_settings.java.package_name" field - # in gapic.yaml. API teams should use the protobuf java_package option - # where possible. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # library_package: com.google.cloud.pubsub.v1 - # @!attribute [rw] service_class_names - # @return [::Google::Protobuf::Map{::String => ::String}] - # Configure the Java class name to use instead of the service's for its - # corresponding generated GAPIC client. Keys are fully-qualified - # service names as they appear in the protobuf (including the full - # the language_settings.java.interface_names" field in gapic.yaml. API - # teams should otherwise use the service name as it appears in the - # protobuf. - # - # Example of a YAML configuration:: - # - # publishing: - # java_settings: - # service_class_names: - # - google.pubsub.v1.Publisher: TopicAdmin - # - google.pubsub.v1.Subscriber: SubscriptionAdmin - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class JavaSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class ServiceClassNamesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for C++ client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class CppSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Php client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class PhpSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Python client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] experimental_features - # @return [::Google::Api::PythonSettings::ExperimentalFeatures] - # Experimental features to be included during client library generation. - class PythonSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Experimental features to be included during client library generation. - # These fields will be deprecated once the feature graduates and is enabled - # by default. - # @!attribute [rw] rest_async_io_enabled - # @return [::Boolean] - # Enables generation of asynchronous REST clients if `rest` transport is - # enabled. By default, asynchronous REST clients will not be generated. - # This feature will be enabled by default 1 month after launching the - # feature in preview packages. - # @!attribute [rw] protobuf_pythonic_types_enabled - # @return [::Boolean] - # Enables generation of protobuf code using new types that are more - # Pythonic which are included in `protobuf>=5.29.x`. This feature will be - # enabled by default 1 month after launching the feature in preview - # packages. - # @!attribute [rw] unversioned_package_disabled - # @return [::Boolean] - # Disables generation of an unversioned Python package for this client - # library. This means that the module names will need to be versioned in - # import statements. For example `import google.cloud.library_v2` instead - # of `import google.cloud.library`. - class ExperimentalFeatures - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Node client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class NodeSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Dotnet client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from original service names to renamed versions. - # This is used when the default generated types - # would cause a naming conflict. (Neither name is - # fully-qualified.) - # Example: Subscriber to SubscriberServiceApi. - # @!attribute [rw] renamed_resources - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map from full resource types to the effective short name - # for the resource. This is used when otherwise resource - # named from different services would cause naming collisions. - # Example entry: - # "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" - # @!attribute [rw] ignored_resources - # @return [::Array<::String>] - # List of full resource types to ignore during generation. - # This is typically used for API-specific Location resources, - # which should be handled by the generator as if they were actually - # the common Location resources. - # Example entry: "documentai.googleapis.com/Location" - # @!attribute [rw] forced_namespace_aliases - # @return [::Array<::String>] - # Namespaces which must be aliased in snippets due to - # a known (but non-generator-predictable) naming collision - # @!attribute [rw] handwritten_signatures - # @return [::Array<::String>] - # Method signatures (in the form "service.method(signature)") - # which are provided separately, so shouldn't be generated. - # Snippets *calling* these methods are still generated, however. - class DotnetSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedResourcesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Settings for Ruby client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - class RubySettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Settings for Go client libraries. - # @!attribute [rw] common - # @return [::Google::Api::CommonLanguageSettings] - # Some settings. - # @!attribute [rw] renamed_services - # @return [::Google::Protobuf::Map{::String => ::String}] - # Map of service names to renamed services. Keys are the package relative - # service names and values are the name to be used for the service client - # and call options. - # - # publishing: - # go_settings: - # renamed_services: - # Publisher: TopicAdmin - class GoSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class RenamedServicesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes the generator configuration for a method. - # @!attribute [rw] selector - # @return [::String] - # The fully qualified name of the method, for which the options below apply. - # This is used to find the method to apply the options. - # - # Example: - # - # publishing: - # method_settings: - # - selector: google.storage.control.v2.StorageControl.CreateFolder - # # method settings for CreateFolder... - # @!attribute [rw] long_running - # @return [::Google::Api::MethodSettings::LongRunning] - # Describes settings to use for long-running operations when generating - # API methods for RPCs. Complements RPCs that use the annotations in - # google/longrunning/operations.proto. - # - # Example of a YAML configuration:: - # - # publishing: - # method_settings: - # - selector: google.cloud.speech.v2.Speech.BatchRecognize - # long_running: - # initial_poll_delay: 60s # 1 minute - # poll_delay_multiplier: 1.5 - # max_poll_delay: 360s # 6 minutes - # total_poll_timeout: 54000s # 90 minutes - # @!attribute [rw] auto_populated_fields - # @return [::Array<::String>] - # List of top-level fields of the request message, that should be - # automatically populated by the client libraries based on their - # (google.api.field_info).format. Currently supported format: UUID4. - # - # Example of a YAML configuration: - # - # publishing: - # method_settings: - # - selector: google.example.v1.ExampleService.CreateExample - # auto_populated_fields: - # - request_id - class MethodSettings - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes settings to use when generating API methods that use the - # long-running operation pattern. - # All default values below are from those used in the client library - # generators (e.g. - # [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). - # @!attribute [rw] initial_poll_delay - # @return [::Google::Protobuf::Duration] - # Initial delay after which the first poll request will be made. - # Default value: 5 seconds. - # @!attribute [rw] poll_delay_multiplier - # @return [::Float] - # Multiplier to gradually increase delay between subsequent polls until it - # reaches max_poll_delay. - # Default value: 1.5. - # @!attribute [rw] max_poll_delay - # @return [::Google::Protobuf::Duration] - # Maximum time between two subsequent poll requests. - # Default value: 45 seconds. - # @!attribute [rw] total_poll_timeout - # @return [::Google::Protobuf::Duration] - # Total polling timeout. - # Default value: 5 minutes. - class LongRunning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # This message is used to configure the generation of a subset of the RPCs in - # a service for client libraries. - # @!attribute [rw] methods - # @return [::Array<::String>] - # An allowlist of the fully qualified names of RPCs that should be included - # on public client surfaces. - # @!attribute [rw] generate_omitted_as_internal - # @return [::Boolean] - # Setting this to true indicates to the client generators that methods - # that would be excluded from the generation should instead be generated - # in a way that indicates these methods should not be consumed by - # end users. How this is expressed is up to individual language - # implementations to decide. Some examples may be: added annotations, - # obfuscated identifiers, or other language idiomatic patterns. - class SelectiveGapicGeneration - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The organization for which the client libraries are being published. - # Affects the url where generated docs are published, etc. - module ClientLibraryOrganization - # Not useful. - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 - - # Google Cloud Platform Org. - CLOUD = 1 - - # Ads (Advertising) Org. - ADS = 2 - - # Photos Org. - PHOTOS = 3 - - # Street View Org. - STREET_VIEW = 4 - - # Shopping Org. - SHOPPING = 5 - - # Geo Org. - GEO = 6 - - # Generative AI - https://developers.generativeai.google - GENERATIVE_AI = 7 - end - - # To where should client libraries be published? - module ClientLibraryDestination - # Client libraries will neither be generated nor published to package - # managers. - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 - - # Generate the client library in a repo under github.com/googleapis, - # but don't publish it to package managers. - GITHUB = 10 - - # Publish the library to package managers like nuget.org and npmjs.com. - PACKAGE_MANAGER = 20 - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb deleted file mode 100644 index 87dc4a4ab1ff..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/iam/credentials/v1/common.rb +++ /dev/null @@ -1,186 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module Credentials - module V1 - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @!attribute [rw] delegates - # @return [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @!attribute [rw] scope - # @return [::Array<::String>] - # Required. Code to identify the scopes to be included in the OAuth 2.0 access token. - # See https://developers.google.com/identity/protocols/googlescopes for more - # information. - # At least one value required. - # @!attribute [rw] lifetime - # @return [::Google::Protobuf::Duration] - # The desired lifetime duration of the access token in seconds. - # Must be set to a value less than or equal to 3600 (1 hour). If a value is - # not specified, the token's lifetime will be set to a default value of one - # hour. - class GenerateAccessTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] access_token - # @return [::String] - # The OAuth 2.0 access token. - # @!attribute [rw] expire_time - # @return [::Google::Protobuf::Timestamp] - # Token expiration time. - # The expiration time is always set. - class GenerateAccessTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @!attribute [rw] delegates - # @return [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @!attribute [rw] payload - # @return [::String] - # Required. The bytes to sign. - class SignBlobRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key_id - # @return [::String] - # The ID of the key used to sign the blob. - # @!attribute [rw] signed_blob - # @return [::String] - # The signed blob. - class SignBlobResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @!attribute [rw] delegates - # @return [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @!attribute [rw] payload - # @return [::String] - # Required. The JWT payload to sign: a JSON object that contains a JWT Claims Set. - class SignJwtRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key_id - # @return [::String] - # The ID of the key used to sign the JWT. - # @!attribute [rw] signed_jwt - # @return [::String] - # The signed JWT. - class SignJwtResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the service account for which the credentials - # are requested, in the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @!attribute [rw] delegates - # @return [::Array<::String>] - # The sequence of service accounts in a delegation chain. Each service - # account must be granted the `roles/iam.serviceAccountTokenCreator` role - # on its next service account in the chain. The last service account in the - # chain must be granted the `roles/iam.serviceAccountTokenCreator` role - # on the service account that is specified in the `name` field of the - # request. - # - # The delegates must have the following format: - # `projects/-/serviceAccounts/{ACCOUNT_EMAIL_OR_UNIQUEID}`. The `-` wildcard - # character is required; replacing it with a project ID is invalid. - # @!attribute [rw] audience - # @return [::String] - # Required. The audience for the token, such as the API or account that this token - # grants access to. - # @!attribute [rw] include_email - # @return [::Boolean] - # Include the service account email in the token. If set to `true`, the - # token will contain `email` and `email_verified` claims. - class GenerateIdTokenRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] token - # @return [::String] - # The OpenId Connect ID token. - class GenerateIdTokenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/proto_docs/google/protobuf/timestamp.rb +++ /dev/null @@ -1,127 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Protobuf - # A Timestamp represents a point in time independent of any time zone or local - # calendar, encoded as a count of seconds and fractions of seconds at - # nanosecond resolution. The count is relative to an epoch at UTC midnight on - # January 1, 1970, in the proleptic Gregorian calendar which extends the - # Gregorian calendar backwards to year one. - # - # All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap - # second table is needed for interpretation, using a [24-hour linear - # smear](https://developers.google.com/time/smear). - # - # The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By - # restricting to that range, we ensure that we can convert to and from [RFC - # 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. - # - # # Examples - # - # Example 1: Compute Timestamp from POSIX `time()`. - # - # Timestamp timestamp; - # timestamp.set_seconds(time(NULL)); - # timestamp.set_nanos(0); - # - # Example 2: Compute Timestamp from POSIX `gettimeofday()`. - # - # struct timeval tv; - # gettimeofday(&tv, NULL); - # - # Timestamp timestamp; - # timestamp.set_seconds(tv.tv_sec); - # timestamp.set_nanos(tv.tv_usec * 1000); - # - # Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. - # - # FILETIME ft; - # GetSystemTimeAsFileTime(&ft); - # UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; - # - # // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z - # // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. - # Timestamp timestamp; - # timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); - # timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); - # - # Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. - # - # long millis = System.currentTimeMillis(); - # - # Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) - # .setNanos((int) ((millis % 1000) * 1000000)).build(); - # - # Example 5: Compute Timestamp from Java `Instant.now()`. - # - # Instant now = Instant.now(); - # - # Timestamp timestamp = - # Timestamp.newBuilder().setSeconds(now.getEpochSecond()) - # .setNanos(now.getNano()).build(); - # - # Example 6: Compute Timestamp from current time in Python. - # - # timestamp = Timestamp() - # timestamp.GetCurrentTime() - # - # # JSON Mapping - # - # In JSON format, the Timestamp type is encoded as a string in the - # [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the - # format is "\\{year}-\\{month}-\\{day}T\\{hour}:\\{min}:\\{sec}[.\\{frac_sec}]Z" - # where \\{year} is always expressed using four digits while \\{month}, \\{day}, - # \\{hour}, \\{min}, and \\{sec} are zero-padded to two digits each. The fractional - # seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), - # are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone - # is required. A proto3 JSON serializer should always use UTC (as indicated by - # "Z") when printing the Timestamp type and a proto3 JSON parser should be - # able to accept both UTC and other timezones (as indicated by an offset). - # - # For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past - # 01:30 UTC on January 15, 2017. - # - # In JavaScript, one can convert a Date object to this format using the - # standard - # [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) - # method. In Python, a standard `datetime.datetime` object can be converted - # to this format using - # [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with - # the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use - # the Joda Time's [`ISODateTimeFormat.dateTime()`]( - # http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() - # ) to obtain a formatter capable of generating timestamps in this format. - # @!attribute [rw] seconds - # @return [::Integer] - # Represents seconds of UTC time since Unix epoch - # 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to - # 9999-12-31T23:59:59Z inclusive. - # @!attribute [rw] nanos - # @return [::Integer] - # Non-negative fractions of a second at nanosecond resolution. Negative - # second values with fractions must still have non-negative nanos values - # that count forward in time. Must be from 0 to 999,999,999 - # inclusive. - class Timestamp - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/Gemfile b/owl-bot-staging/google-iam-credentials-v1/snippets/Gemfile deleted file mode 100644 index 68414f33ff49..000000000000 --- a/owl-bot-staging/google-iam-credentials-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-iam-credentials-v1", path: "../" -else - gem "google-iam-credentials-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-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb deleted file mode 100644 index 9ba589bd6910..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_access_token.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync] -require "google/iam/credentials/v1" - -## -# Snippet for the generate_access_token call in the IAMCredentials service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::Credentials::V1::IAMCredentials::Client#generate_access_token. -# -def generate_access_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::Credentials::V1::IAMCredentials::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new - - # Call the generate_access_token method. - result = client.generate_access_token request - - # The returned object is of type Google::Iam::Credentials::V1::GenerateAccessTokenResponse. - p result -end -# [END iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync] diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb deleted file mode 100644 index 4a1c3491483f..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/generate_id_token.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync] -require "google/iam/credentials/v1" - -## -# Snippet for the generate_id_token call in the IAMCredentials service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::Credentials::V1::IAMCredentials::Client#generate_id_token. -# -def generate_id_token - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::Credentials::V1::IAMCredentials::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::Credentials::V1::GenerateIdTokenRequest.new - - # Call the generate_id_token method. - result = client.generate_id_token request - - # The returned object is of type Google::Iam::Credentials::V1::GenerateIdTokenResponse. - p result -end -# [END iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync] diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb deleted file mode 100644 index 27272c74919b..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_blob.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iamcredentials_v1_generated_IAMCredentials_SignBlob_sync] -require "google/iam/credentials/v1" - -## -# Snippet for the sign_blob call in the IAMCredentials service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::Credentials::V1::IAMCredentials::Client#sign_blob. -# -def sign_blob - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::Credentials::V1::IAMCredentials::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::Credentials::V1::SignBlobRequest.new - - # Call the sign_blob method. - result = client.sign_blob request - - # The returned object is of type Google::Iam::Credentials::V1::SignBlobResponse. - p result -end -# [END iamcredentials_v1_generated_IAMCredentials_SignBlob_sync] diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb b/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb deleted file mode 100644 index 806a57c1515f..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/snippets/iam_credentials/sign_jwt.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -# [START iamcredentials_v1_generated_IAMCredentials_SignJwt_sync] -require "google/iam/credentials/v1" - -## -# Snippet for the sign_jwt call in the IAMCredentials service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating 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::Credentials::V1::IAMCredentials::Client#sign_jwt. -# -def sign_jwt - # Create a client object. The client can be reused for multiple calls. - client = Google::Iam::Credentials::V1::IAMCredentials::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Iam::Credentials::V1::SignJwtRequest.new - - # Call the sign_jwt method. - result = client.sign_jwt request - - # The returned object is of type Google::Iam::Credentials::V1::SignJwtResponse. - p result -end -# [END iamcredentials_v1_generated_IAMCredentials_SignJwt_sync] diff --git a/owl-bot-staging/google-iam-credentials-v1/snippets/snippet_metadata_google.iam.credentials.v1.json b/owl-bot-staging/google-iam-credentials-v1/snippets/snippet_metadata_google.iam.credentials.v1.json deleted file mode 100644 index 6ca1e368089a..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/snippets/snippet_metadata_google.iam.credentials.v1.json +++ /dev/null @@ -1,175 +0,0 @@ -{ - "client_library": { - "name": "google-iam-credentials-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.iam.credentials.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "iamcredentials_v1_generated_IAMCredentials_GenerateAccessToken_sync", - "title": "Snippet for the generate_access_token call in the IAMCredentials service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::Credentials::V1::IAMCredentials::Client#generate_access_token.", - "file": "iam_credentials/generate_access_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_access_token", - "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client#generate_access_token", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::Credentials::V1::GenerateAccessTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::Credentials::V1::GenerateAccessTokenResponse", - "client": { - "short_name": "IAMCredentials::Client", - "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client" - }, - "method": { - "short_name": "GenerateAccessToken", - "full_name": "google.iam.credentials.v1.IAMCredentials.GenerateAccessToken", - "service": { - "short_name": "IAMCredentials", - "full_name": "google.iam.credentials.v1.IAMCredentials" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iamcredentials_v1_generated_IAMCredentials_GenerateIdToken_sync", - "title": "Snippet for the generate_id_token call in the IAMCredentials service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::Credentials::V1::IAMCredentials::Client#generate_id_token.", - "file": "iam_credentials/generate_id_token.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_id_token", - "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client#generate_id_token", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::Credentials::V1::GenerateIdTokenRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::Credentials::V1::GenerateIdTokenResponse", - "client": { - "short_name": "IAMCredentials::Client", - "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client" - }, - "method": { - "short_name": "GenerateIdToken", - "full_name": "google.iam.credentials.v1.IAMCredentials.GenerateIdToken", - "service": { - "short_name": "IAMCredentials", - "full_name": "google.iam.credentials.v1.IAMCredentials" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iamcredentials_v1_generated_IAMCredentials_SignBlob_sync", - "title": "Snippet for the sign_blob call in the IAMCredentials service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::Credentials::V1::IAMCredentials::Client#sign_blob.", - "file": "iam_credentials/sign_blob.rb", - "language": "RUBY", - "client_method": { - "short_name": "sign_blob", - "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client#sign_blob", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::Credentials::V1::SignBlobRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::Credentials::V1::SignBlobResponse", - "client": { - "short_name": "IAMCredentials::Client", - "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client" - }, - "method": { - "short_name": "SignBlob", - "full_name": "google.iam.credentials.v1.IAMCredentials.SignBlob", - "service": { - "short_name": "IAMCredentials", - "full_name": "google.iam.credentials.v1.IAMCredentials" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "iamcredentials_v1_generated_IAMCredentials_SignJwt_sync", - "title": "Snippet for the sign_jwt call in the IAMCredentials service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Iam::Credentials::V1::IAMCredentials::Client#sign_jwt.", - "file": "iam_credentials/sign_jwt.rb", - "language": "RUBY", - "client_method": { - "short_name": "sign_jwt", - "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client#sign_jwt", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::Credentials::V1::SignJwtRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::Credentials::V1::SignJwtResponse", - "client": { - "short_name": "IAMCredentials::Client", - "full_name": "::Google::Iam::Credentials::V1::IAMCredentials::Client" - }, - "method": { - "short_name": "SignJwt", - "full_name": "google.iam.credentials.v1.IAMCredentials.SignJwt", - "service": { - "short_name": "IAMCredentials", - "full_name": "google.iam.credentials.v1.IAMCredentials" - } - } - }, - "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-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb b/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_paths_test.rb deleted file mode 100644 index 3a872d20e5a0..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_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/iam/credentials/v1/iam_credentials" - -class ::Google::Iam::Credentials::V1::IAMCredentials::ClientPathsTest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_service_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_account_path project: "value0", service_account: "value1" - assert_equal "projects/value0/serviceAccounts/value1", path - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb b/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.rb deleted file mode 100644 index 1c350f0ecfba..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_rest_test.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! - -require "helper" -require "gapic/rest" -require "google/iam/credentials/v1/iamcredentials_pb" -require "google/iam/credentials/v1/iam_credentials/rest" - - -class ::Google::Iam::Credentials::V1::IAMCredentials::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_generate_access_token - # Create test objects. - client_result = ::Google::Iam::Credentials::V1::GenerateAccessTokenResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delegates = ["hello world"] - scope = ["hello world"] - lifetime = {} - - generate_access_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::Credentials::V1::IAMCredentials::Rest::ServiceStub.stub :transcode_generate_access_token_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_access_token_client_stub do - # Create client - client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_access_token({ name: name, delegates: delegates, scope: scope, lifetime: lifetime }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_access_token name: name, delegates: delegates, scope: scope, lifetime: lifetime do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_access_token ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new(name: name, delegates: delegates, scope: scope, lifetime: lifetime) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_access_token({ name: name, delegates: delegates, scope: scope, lifetime: lifetime }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_access_token(::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new(name: name, delegates: delegates, scope: scope, lifetime: lifetime), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_access_token_client_stub.call_count - end - end - end - - def test_generate_id_token - # Create test objects. - client_result = ::Google::Iam::Credentials::V1::GenerateIdTokenResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delegates = ["hello world"] - audience = "hello world" - include_email = true - - generate_id_token_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::Credentials::V1::IAMCredentials::Rest::ServiceStub.stub :transcode_generate_id_token_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_id_token_client_stub do - # Create client - client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_id_token({ name: name, delegates: delegates, audience: audience, include_email: include_email }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_id_token name: name, delegates: delegates, audience: audience, include_email: include_email do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_id_token ::Google::Iam::Credentials::V1::GenerateIdTokenRequest.new(name: name, delegates: delegates, audience: audience, include_email: include_email) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_id_token({ name: name, delegates: delegates, audience: audience, include_email: include_email }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_id_token(::Google::Iam::Credentials::V1::GenerateIdTokenRequest.new(name: name, delegates: delegates, audience: audience, include_email: include_email), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_id_token_client_stub.call_count - end - end - end - - def test_sign_blob - # Create test objects. - client_result = ::Google::Iam::Credentials::V1::SignBlobResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delegates = ["hello world"] - payload = "hello world" - - sign_blob_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Iam::Credentials::V1::IAMCredentials::Rest::ServiceStub.stub :transcode_sign_blob_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, sign_blob_client_stub do - # Create client - client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.sign_blob({ name: name, delegates: delegates, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.sign_blob name: name, delegates: delegates, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.sign_blob ::Google::Iam::Credentials::V1::SignBlobRequest.new(name: name, delegates: delegates, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.sign_blob({ name: name, delegates: delegates, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.sign_blob(::Google::Iam::Credentials::V1::SignBlobRequest.new(name: name, delegates: delegates, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, sign_blob_client_stub.call_count - end - end - end - - def test_sign_jwt - # Create test objects. - client_result = ::Google::Iam::Credentials::V1::SignJwtResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delegates = ["hello world"] - payload = "hello world" - - sign_jwt_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"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::Credentials::V1::IAMCredentials::Rest::ServiceStub.stub :transcode_sign_jwt_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, sign_jwt_client_stub do - # Create client - client = ::Google::Iam::Credentials::V1::IAMCredentials::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.sign_jwt({ name: name, delegates: delegates, payload: payload }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.sign_jwt name: name, delegates: delegates, payload: payload do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.sign_jwt ::Google::Iam::Credentials::V1::SignJwtRequest.new(name: name, delegates: delegates, payload: payload) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.sign_jwt({ name: name, delegates: delegates, payload: payload }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.sign_jwt(::Google::Iam::Credentials::V1::SignJwtRequest.new(name: name, delegates: delegates, payload: payload), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, sign_jwt_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::Credentials::V1::IAMCredentials::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::Credentials::V1::IAMCredentials::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb b/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb deleted file mode 100644 index 3953d3ced1aa..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/test/google/iam/credentials/v1/iam_credentials_test.rb +++ /dev/null @@ -1,356 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing 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/credentials/v1/iamcredentials_pb" -require "google/iam/credentials/v1/iam_credentials" - -class ::Google::Iam::Credentials::V1::IAMCredentials::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_generate_access_token - # Create GRPC objects. - grpc_response = ::Google::Iam::Credentials::V1::GenerateAccessTokenResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delegates = ["hello world"] - scope = ["hello world"] - lifetime = {} - - generate_access_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_access_token, name - assert_kind_of ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["delegates"] - assert_equal ["hello world"], request["scope"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Duration), request["lifetime"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_access_token_client_stub do - # Create client - client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_access_token({ name: name, delegates: delegates, scope: scope, lifetime: lifetime }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_access_token name: name, delegates: delegates, scope: scope, lifetime: lifetime do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_access_token ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new(name: name, delegates: delegates, scope: scope, lifetime: lifetime) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_access_token({ name: name, delegates: delegates, scope: scope, lifetime: lifetime }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_access_token(::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new(name: name, delegates: delegates, scope: scope, lifetime: lifetime), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_access_token_client_stub.call_rpc_count - end - end - - def test_generate_id_token - # Create GRPC objects. - grpc_response = ::Google::Iam::Credentials::V1::GenerateIdTokenResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delegates = ["hello world"] - audience = "hello world" - include_email = true - - generate_id_token_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_id_token, name - assert_kind_of ::Google::Iam::Credentials::V1::GenerateIdTokenRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["delegates"] - assert_equal "hello world", request["audience"] - assert_equal true, request["include_email"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_id_token_client_stub do - # Create client - client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_id_token({ name: name, delegates: delegates, audience: audience, include_email: include_email }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_id_token name: name, delegates: delegates, audience: audience, include_email: include_email do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_id_token ::Google::Iam::Credentials::V1::GenerateIdTokenRequest.new(name: name, delegates: delegates, audience: audience, include_email: include_email) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_id_token({ name: name, delegates: delegates, audience: audience, include_email: include_email }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_id_token(::Google::Iam::Credentials::V1::GenerateIdTokenRequest.new(name: name, delegates: delegates, audience: audience, include_email: include_email), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_id_token_client_stub.call_rpc_count - end - end - - def test_sign_blob - # Create GRPC objects. - grpc_response = ::Google::Iam::Credentials::V1::SignBlobResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delegates = ["hello world"] - payload = "hello world" - - sign_blob_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :sign_blob, name - assert_kind_of ::Google::Iam::Credentials::V1::SignBlobRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["delegates"] - assert_equal "hello world", request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, sign_blob_client_stub do - # Create client - client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.sign_blob({ name: name, delegates: delegates, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.sign_blob name: name, delegates: delegates, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.sign_blob ::Google::Iam::Credentials::V1::SignBlobRequest.new(name: name, delegates: delegates, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.sign_blob({ name: name, delegates: delegates, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.sign_blob(::Google::Iam::Credentials::V1::SignBlobRequest.new(name: name, delegates: delegates, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, sign_blob_client_stub.call_rpc_count - end - end - - def test_sign_jwt - # Create GRPC objects. - grpc_response = ::Google::Iam::Credentials::V1::SignJwtResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - delegates = ["hello world"] - payload = "hello world" - - sign_jwt_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :sign_jwt, name - assert_kind_of ::Google::Iam::Credentials::V1::SignJwtRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["delegates"] - assert_equal "hello world", request["payload"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, sign_jwt_client_stub do - # Create client - client = ::Google::Iam::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.sign_jwt({ name: name, delegates: delegates, payload: payload }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.sign_jwt name: name, delegates: delegates, payload: payload do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.sign_jwt ::Google::Iam::Credentials::V1::SignJwtRequest.new(name: name, delegates: delegates, payload: payload) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.sign_jwt({ name: name, delegates: delegates, payload: payload }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.sign_jwt(::Google::Iam::Credentials::V1::SignJwtRequest.new(name: name, delegates: delegates, payload: payload), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, sign_jwt_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::Credentials::V1::IAMCredentials::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::Credentials::V1::IAMCredentials::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::Credentials::V1::IAMCredentials::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Iam::Credentials::V1::IAMCredentials::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-iam-credentials-v1/test/helper.rb b/owl-bot-staging/google-iam-credentials-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-iam-credentials-v1/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-iam-credentials/.gitignore b/owl-bot-staging/google-iam-credentials/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-iam-credentials/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Ignore bundler lockfiles -Gemfile.lock -gems.locked - -# Ignore documentation output -doc/* -.yardoc/* - -# Ignore test output -coverage/* - -# Ignore build artifacts -pkg/* - -# Ignore files commonly present in certain dev environments -.vagrant -.DS_STORE -.idea -*.iml - -# Ignore synth output -__pycache__ diff --git a/owl-bot-staging/google-iam-credentials/.repo-metadata.json b/owl-bot-staging/google-iam-credentials/.repo-metadata.json deleted file mode 100644 index 47107e333757..000000000000 --- a/owl-bot-staging/google-iam-credentials/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "iamcredentials.googleapis.com", - "api_shortname": "iamcredentials", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-iam-credentials/latest", - "distribution_name": "google-iam-credentials", - "is_cloud": true, - "language": "ruby", - "name": "iamcredentials", - "name_pretty": "IAM Service Account Credentials API", - "product_documentation": "https://cloud.google.com/iam", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens.", - "ruby-cloud-env-prefix": "IAM_CREDENTIALS", - "ruby-cloud-product-url": "https://cloud.google.com/iam", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-iam-credentials/.rubocop.yml b/owl-bot-staging/google-iam-credentials/.rubocop.yml deleted file mode 100644 index d00a4e58fa85..000000000000 --- a/owl-bot-staging/google-iam-credentials/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-iam-credentials.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -Metrics/AbcSize: - Enabled: false -Metrics/ClassLength: - Enabled: false -Metrics/CyclomaticComplexity: - Enabled: false -Metrics/MethodLength: - Enabled: false -Metrics/ModuleLength: - Enabled: false -Metrics/PerceivedComplexity: - Enabled: false - -Naming/FileName: - Exclude: - - "lib/google-iam-credentials.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-iam-credentials/.toys.rb b/owl-bot-staging/google-iam-credentials/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-iam-credentials/.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-iam-credentials/.yardopts b/owl-bot-staging/google-iam-credentials/.yardopts deleted file mode 100644 index becb6cbe272b..000000000000 --- a/owl-bot-staging/google-iam-credentials/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="IAM Service Account Credentials API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-iam-credentials/AUTHENTICATION.md b/owl-bot-staging/google-iam-credentials/AUTHENTICATION.md deleted file mode 100644 index b029fd4dd543..000000000000 --- a/owl-bot-staging/google-iam-credentials/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-iam-credentials 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-iam-credentials 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/iam/credentials" - -client = Google::Iam::Credentials.iam_credentials do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/iam/credentials" - -Google::Iam::Credentials.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Iam::Credentials.iam_credentials -``` - -### 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-iam-credentials -checks for credentials are: - -* `GOOGLE_CLOUD_CREDENTIALS` - Path to JSON file, or JSON contents -* `GOOGLE_APPLICATION_CREDENTIALS` - Path to JSON file - -```ruby -require "google/iam/credentials" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Iam::Credentials.iam_credentials -``` - -### 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-iam-credentials/CHANGELOG.md b/owl-bot-staging/google-iam-credentials/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-iam-credentials/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-iam-credentials/Gemfile b/owl-bot-staging/google-iam-credentials/Gemfile deleted file mode 100644 index 40c5f0fcef06..000000000000 --- a/owl-bot-staging/google-iam-credentials/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-iam-credentials-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-iam-credentials.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-iam-credentials/LICENSE.md b/owl-bot-staging/google-iam-credentials/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-iam-credentials/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-iam-credentials/README.md b/owl-bot-staging/google-iam-credentials/README.md deleted file mode 100644 index 89d1eb98fa95..000000000000 --- a/owl-bot-staging/google-iam-credentials/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the IAM Service Account Credentials API - -API Client library for the IAM Service Account Credentials API - -The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-iam-credentials-v*`. -The gem `google-iam-credentials` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-iam-credentials/latest) -for this library, google-iam-credentials, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-iam-credentials-v1](https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/iam) -for more usage information. - -## Quick Start - -``` -$ gem install google-iam-credentials -``` - -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/iamcredentials.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/iam/credentials" - -client = Google::Iam::Credentials.iam_credentials -request = ::Google::Iam::Credentials::V1::GenerateAccessTokenRequest.new # (request fields as keyword arguments...) -response = client.generate_access_token request -``` - -## Debug Logging - -This library comes with opt-in Debug Logging that can help you troubleshoot -your application's integration with the API. When logging is activated, key -events such as requests and responses, along with data payloads and metadata -such as headers and client configuration, are logged to the standard error -stream. - -**WARNING:** Client Library Debug Logging includes your data payloads in -plaintext, which could include sensitive data such as PII for yourself or your -customers, private keys, or other security data that could be compromising if -leaked. Always practice good data hygiene with your application logs, and follow -the principle of least access. Google also recommends that Client Library Debug -Logging be enabled only temporarily during active debugging, and not used -permanently in production. - -To enable logging, set the environment variable `GOOGLE_SDK_RUBY_LOGGING_GEMS` -to the value `all`. Alternatively, you can set the value to a comma-delimited -list of client library gem names. This will select the default logging behavior, -which writes logs to the standard error stream. On a local workstation, this may -result in logs appearing on the console. When running on a Google Cloud hosting -service such as [Google Cloud Run](https://cloud.google.com/run), this generally -results in logs appearing alongside your application logs in the -[Google Cloud Logging](https://cloud.google.com/logging/) service. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-iam-credentials-v1](https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest). - -## Supported Ruby Versions - -This library is supported on Ruby 3.0+. - -Google provides official support for Ruby versions that are actively supported -by Ruby Core—that is, Ruby versions that are either in normal maintenance or -in security maintenance, and not end of life. Older versions of Ruby _may_ -still work, but are unsupported and not recommended. See -https://www.ruby-lang.org/en/downloads/branches/ for details about the Ruby -support schedule. - -## Which client should I use? - -Most modern Ruby client libraries for Google APIs come in two flavors: the main -client library with a name such as `google-iam-credentials`, -and lower-level _versioned_ client libraries with names such as -`google-iam-credentials-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-iam-credentials`. -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-iam-credentials-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-iam-credentials/Rakefile b/owl-bot-staging/google-iam-credentials/Rakefile deleted file mode 100644 index 124a313e8f1a..000000000000 --- a/owl-bot-staging/google-iam-credentials/Rakefile +++ /dev/null @@ -1,169 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "bundler/setup" -require "bundler/gem_tasks" - -require "rubocop/rake_task" -RuboCop::RakeTask.new - -require "rake/testtask" -desc "Run tests." -Rake::TestTask.new do |t| - t.libs << "test" - t.test_files = FileList["test/**/*_test.rb"] - t.warning = true -end - -desc "Runs the smoke tests." -Rake::TestTask.new :smoke_test do |t| - t.test_files = FileList["acceptance/**/*smoke_test.rb"] - t.warning = false -end - -# Acceptance tests -desc "Run the google-iam-credentials acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["IAM_CREDENTIALS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["IAM_CREDENTIALS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["IAM_CREDENTIALS_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 IAM_CREDENTIALS_TEST_PROJECT=test123 IAM_CREDENTIALS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/iam/credentials/v1/iam_credentials/credentials" - ::Google::Iam::Credentials::V1::IAMCredentials::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["IAM_CREDENTIALS_PROJECT"] = project - ENV["IAM_CREDENTIALS_TEST_PROJECT"] = project - ENV["IAM_CREDENTIALS_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-iam-credentials 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-iam-credentials 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-iam-credentials 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-iam-credentials gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-iam-credentials" - header "google-iam-credentials rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-iam-credentials yard", "*" - Rake::Task[:yard].invoke - header "google-iam-credentials 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-iam-credentials 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-iam-credentials 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-iam-credentials/google-iam-credentials.gemspec b/owl-bot-staging/google-iam-credentials/google-iam-credentials.gemspec deleted file mode 100644 index f8994a44c337..000000000000 --- a/owl-bot-staging/google-iam-credentials/google-iam-credentials.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/iam/credentials/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-iam-credentials" - gem.version = Google::Iam::Credentials::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Service Account Credentials API creates short-lived credentials for Identity and Access Management (IAM) service accounts. You can also use this API to sign JSON Web Tokens (JWTs), as well as blobs of binary data that contain other types of tokens." - gem.summary = "API Client library for the IAM Service Account Credentials API" - gem.homepage = "https://github.com/googleapis/google-cloud-ruby" - gem.license = "Apache-2.0" - - gem.platform = Gem::Platform::RUBY - - gem.files = `git ls-files -- lib/*`.split("\n") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-iam-credentials-v1", ">= 0.8", "< 2.a" -end diff --git a/owl-bot-staging/google-iam-credentials/lib/google-iam-credentials.rb b/owl-bot-staging/google-iam-credentials/lib/google-iam-credentials.rb deleted file mode 100644 index ed890c65691b..000000000000 --- a/owl-bot-staging/google-iam-credentials/lib/google-iam-credentials.rb +++ /dev/null @@ -1,19 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "google/iam/credentials" unless defined? Google::Iam::Credentials::VERSION diff --git a/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials.rb b/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials.rb deleted file mode 100644 index 11146d0fb630..000000000000 --- a/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials.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 this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/iam/credentials/version" - -require "googleauth" - -module Google - module Iam - module Credentials - ## - # Create a new client object for IAMCredentials. - # - # By default, this returns an instance of - # [Google::Iam::Credentials::V1::IAMCredentials::Client](https://cloud.google.com/ruby/docs/reference/google-iam-credentials-v1/latest/Google-Iam-Credentials-V1-IAMCredentials-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the IAMCredentials service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the IAMCredentials service. - # You can determine whether the method will succeed by calling - # {Google::Iam::Credentials.iam_credentials_available?}. - # - # ## About IAMCredentials - # - # A service account is a special type of Google account that belongs to your - # application or a virtual machine (VM), instead of to an individual end user. - # Your application assumes the identity of the service account to call Google - # APIs, so that the users aren't directly involved. - # - # Service account credentials are used to temporarily assume the identity - # of the service account. Supported credential types include OAuth 2.0 access - # tokens, OpenID Connect ID tokens, self-signed JSON Web Tokens (JWTs), and - # more. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.iam_credentials version: :v1, transport: :grpc, &block - require "google/iam/credentials/#{version.to_s.downcase}" - - package_name = Google::Iam::Credentials - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Iam::Credentials.const_get(package_name).const_get(:IAMCredentials) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the IAMCredentials service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Iam::Credentials.iam_credentials}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the IAMCredentials service, - # or if the versioned client gem needs an update to support the IAMCredentials service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.iam_credentials_available? version: :v1, transport: :grpc - require "google/iam/credentials/#{version.to_s.downcase}" - package_name = Google::Iam::Credentials - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Iam::Credentials.const_get package_name - return false unless service_module.const_defined? :IAMCredentials - service_module = service_module.const_get :IAMCredentials - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - end - end -end - -helper_path = ::File.join __dir__, "credentials", "helpers.rb" -require "google/iam/credentials/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials/version.rb b/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials/version.rb deleted file mode 100644 index 9bd60071616c..000000000000 --- a/owl-bot-staging/google-iam-credentials/lib/google/iam/credentials/version.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - - -module Google - module Iam - module Credentials - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/client_test.rb b/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/client_test.rb deleted file mode 100644 index 09ee233f11a4..000000000000 --- a/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/client_test.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/iam/credentials" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Iam::Credentials::ClientConstructionMinitest < Minitest::Test - class DummyStub - def endpoint - "endpoint.example.com" - end - - def universe_domain - "example.com" - end - - def stub_logger - nil - end - - def logger - nil - end - end - - def test_iam_credentials_grpc - skip unless Google::Iam::Credentials.iam_credentials_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Iam::Credentials.iam_credentials transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Iam::Credentials::V1::IAMCredentials::Client, client - end - end - - def test_iam_credentials_rest - skip unless Google::Iam::Credentials.iam_credentials_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Iam::Credentials.iam_credentials transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Iam::Credentials::V1::IAMCredentials::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/version_test.rb b/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/version_test.rb deleted file mode 100644 index 571cc4089cac..000000000000 --- a/owl-bot-staging/google-iam-credentials/test/google/iam/credentials/version_test.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "helper" -require "google/iam/credentials/version" - -class Google::Iam::Credentials::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Iam::Credentials::VERSION - end -end diff --git a/owl-bot-staging/google-iam-credentials/test/helper.rb b/owl-bot-staging/google-iam-credentials/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-iam-credentials/test/helper.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Auto-generated by gapic-generator-ruby. DO NOT EDIT! - -require "minitest/autorun" -require "minitest/focus" -require "minitest/rg" - -require "grpc" - -require "ostruct"